aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2010-03-09 04:35:00 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-04-07 04:00:30 -0400
commit43b5fefc24157def813154d1867d2960cefff837 (patch)
treebf0e6e0d9203267984a49474c68f59422a66f686 /arch/powerpc
parent6fe9d1facb5346a615f9b571df3b91593afb29c3 (diff)
powerpc/ppc32: Fixup pmd_page to work when ARCH_PFN_OFFSET is non-zero
Instead of referencing mem_map directly, use pfn_to_page. Otherwise the kernel crashes when trying to start userspace if ARCH_PFN_OFFSET is non-zero and CONFIG_BOOKE is not defined Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc32.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
index 55646adfa84..a7db96f2b5c 100644
--- a/arch/powerpc/include/asm/pgtable-ppc32.h
+++ b/arch/powerpc/include/asm/pgtable-ppc32.h
@@ -287,7 +287,7 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry)
287#define pmd_page_vaddr(pmd) \ 287#define pmd_page_vaddr(pmd) \
288 ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) 288 ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
289#define pmd_page(pmd) \ 289#define pmd_page(pmd) \
290 (mem_map + (pmd_val(pmd) >> PAGE_SHIFT)) 290 pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
291#else 291#else
292#define pmd_page_vaddr(pmd) \ 292#define pmd_page_vaddr(pmd) \
293 ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) 293 ((unsigned long) (pmd_val(pmd) & PAGE_MASK))