Skip to content

Commit

Permalink
powerpc: Reduce the PTE_INDEX_SIZE
Browse files Browse the repository at this point in the history
This make one PMD cover 16MB range. That helps in easier implementation of THP
on power. THP core code make use of one pmd entry to track the hugepage and
the range mapped by a single pmd entry should be equal to the hugepage size
supported by the hardware.

This also switch PGD to cover 16GB. That is needed so that we can simplify the
hugetlb page walking code so that we have same pte format for explicit hugepage
and THP hugepage.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Aneesh Kumar K.V authored and Benjamin Herrenschmidt committed Apr 30, 2013
1 parent e2b3d20 commit 419df06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/include/asm/pgtable-ppc64-64k.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include <asm-generic/pgtable-nopud.h>


#define PTE_INDEX_SIZE 12
#define PMD_INDEX_SIZE 12
#define PTE_INDEX_SIZE 8
#define PMD_INDEX_SIZE 10
#define PUD_INDEX_SIZE 0
#define PGD_INDEX_SIZE 6
#define PGD_INDEX_SIZE 12

#ifndef __ASSEMBLY__
#define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE)
Expand Down

0 comments on commit 419df06

Please sign in to comment.