From 5287a6293d19fa8d7d504c59a1143cada747f09a Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Thu, 23 Jun 2011 16:19:08 +0100 Subject: [PATCH] fixup! ARM: LPAE: Add fault handling support LPAE only uses one hardware entry per PMD, so no need to calculate the index in do_translation_fault(). Signed-off-by: Catalin Marinas --- arch/arm/mm/fault.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index e06918b59e25..db8d7da796a9 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -443,6 +443,12 @@ do_translation_fault(unsigned long addr, unsigned int fsr, pmd = pmd_offset(pud, addr); pmd_k = pmd_offset(pud_k, addr); +#ifdef CONFIG_ARM_LPAE + /* + * Only one hardware entry per PMD with LPAE. + */ + index = 0; +#else /* * On ARM one Linux PGD entry contains two hardware entries (see page * tables layout in pgtable.h). We normally guarantee that we always @@ -452,6 +458,7 @@ do_translation_fault(unsigned long addr, unsigned int fsr, * for the first of pair. */ index = (addr >> SECTION_SHIFT) & 1; +#endif if (pmd_none(pmd_k[index])) goto bad_area; -- 2.39.5