Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mm: Fix slice state initialization for Book3E

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>

authored by

Michael Ellerman and committed by
Benjamin Herrenschmidt
ee7a2aa3 5e8e7b40

+1 -1
+1 -1
arch/powerpc/include/asm/page_64.h
··· 130 130 extern void slice_set_range_psize(struct mm_struct *mm, unsigned long start, 131 131 unsigned long len, unsigned int psize); 132 132 133 - #define slice_mm_new_context(mm) ((mm)->context.id == 0) 133 + #define slice_mm_new_context(mm) ((mm)->context.id == MMU_NO_CONTEXT) 134 134 135 135 #endif /* __ASSEMBLY__ */ 136 136 #else