diff options
author | Jon Tollefson <kniht@linux.vnet.ibm.com> | 2008-07-24 00:27:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:19 -0400 |
commit | 0d9ea75443dc7e37843e656b8ebc947a6d16d618 (patch) | |
tree | 4eb47a4468a92c90a90873d1646196955b487996 /include/asm-powerpc/pgalloc-64.h | |
parent | f4a67cceee4a6f5ed38011a698c9e34747270ae5 (diff) |
powerpc: support multiple hugepage sizes
Instead of using the variable mmu_huge_psize to keep track of the huge
page size we use an array of MMU_PAGE_* values. For each supported huge
page size we need to know the hugepte_shift value and have a
pgtable_cache. The hstate or an mmu_huge_psizes index is passed to
functions so that they know which huge page size they should use.
The hugepage sizes 16M and 64K are setup(if available on the hardware) so
that they don't have to be set on the boot cmd line in order to use them.
The number of 16G pages have to be specified at boot-time though (e.g.
hugepagesz=16G hugepages=5).
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-powerpc/pgalloc-64.h')
-rw-r--r-- | include/asm-powerpc/pgalloc-64.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-powerpc/pgalloc-64.h b/include/asm-powerpc/pgalloc-64.h index 68980990f62a..812a1d8f35cb 100644 --- a/include/asm-powerpc/pgalloc-64.h +++ b/include/asm-powerpc/pgalloc-64.h | |||
@@ -22,7 +22,7 @@ extern struct kmem_cache *pgtable_cache[]; | |||
22 | #define PUD_CACHE_NUM 1 | 22 | #define PUD_CACHE_NUM 1 |
23 | #define PMD_CACHE_NUM 1 | 23 | #define PMD_CACHE_NUM 1 |
24 | #define HUGEPTE_CACHE_NUM 2 | 24 | #define HUGEPTE_CACHE_NUM 2 |
25 | #define PTE_NONCACHE_NUM 3 /* from GFP rather than kmem_cache */ | 25 | #define PTE_NONCACHE_NUM 7 /* from GFP rather than kmem_cache */ |
26 | 26 | ||
27 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 27 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
28 | { | 28 | { |
@@ -119,7 +119,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) | |||
119 | __free_page(ptepage); | 119 | __free_page(ptepage); |
120 | } | 120 | } |
121 | 121 | ||
122 | #define PGF_CACHENUM_MASK 0x3 | 122 | #define PGF_CACHENUM_MASK 0x7 |
123 | 123 | ||
124 | typedef struct pgtable_free { | 124 | typedef struct pgtable_free { |
125 | unsigned long val; | 125 | unsigned long val; |