powerpc/mm: Fix slice state initialization for Book3E
authorMichael Ellerman <michael@ozlabs.org>
Tue, 12 Apr 2011 19:00:05 +0000 (19:00 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 20 Apr 2011 06:59:20 +0000 (16:59 +1000)
On Book3E, MMU_NO_CONTEXT != 0, but the slice_mm_new_context()
macro assumes that it is.  This means that the map of the
page sizes for each slice is always initialized to zeroes
(which happens to be 4k pages), rather than to the correct
default base page size value - which might be 64k.

This patch corrects the problem.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/page_64.h

index 812b2cd80aed8a66b6b35b5399d75d20e63becc3..488c52eb64cb51820b3adecc90a89da33bde533d 100644 (file)
@@ -130,7 +130,7 @@ extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize);
 extern void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
                                  unsigned long len, unsigned int psize);
 
-#define slice_mm_new_context(mm)       ((mm)->context.id == 0)
+#define slice_mm_new_context(mm)       ((mm)->context.id == MMU_NO_CONTEXT)
 
 #endif /* __ASSEMBLY__ */
 #else