aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pgalloc.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-05 23:50:58 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-19 20:25:12 -0400
commitaf984b816530b4725b92e01ecfba7c5e3eab910d (patch)
tree61094de1257e469bd700deddacf352404a532e17 /arch/powerpc/include/asm/pgalloc.h
parent2d27cfd3286966c04d4192a9db5a6c7ea60eebf1 (diff)
powerpc/mm: Fix encoding of page table cache numbers
The mask used to encode the page table cache number in the batch when freeing page tables was too small for the new possible values of MMU page sizes. This increases it along with a comment explaining the constraints. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/pgalloc.h')
-rw-r--r--arch/powerpc/include/asm/pgalloc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h
index 34b080671f00..f2e812de7c3c 100644
--- a/arch/powerpc/include/asm/pgalloc.h
+++ b/arch/powerpc/include/asm/pgalloc.h
@@ -28,7 +28,12 @@ typedef struct pgtable_free {
28 unsigned long val; 28 unsigned long val;
29} pgtable_free_t; 29} pgtable_free_t;
30 30
31#define PGF_CACHENUM_MASK 0x7 31/* This needs to be big enough to allow for MMU_PAGE_COUNT + 2 to be stored
32 * and small enough to fit in the low bits of any naturally aligned page
33 * table cache entry. Arbitrarily set to 0x1f, that should give us some
34 * room to grow
35 */
36#define PGF_CACHENUM_MASK 0x1f
32 37
33static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum, 38static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum,
34 unsigned long mask) 39 unsigned long mask)