aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/mm/fault_32.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 08d0117d90fa..dbbdeba2cee5 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -60,8 +60,15 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
60 60
61 if (!pmd_present(*pmd)) 61 if (!pmd_present(*pmd))
62 set_pmd(pmd, *pmd_k); 62 set_pmd(pmd, *pmd_k);
63 else 63 else {
64 /*
65 * The page tables are fully synchronised so there must
66 * be another reason for the fault. Return NULL here to
67 * signal that we have not taken care of the fault.
68 */
64 BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); 69 BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
70 return NULL;
71 }
65 72
66 return pmd_k; 73 return pmd_k;
67} 74}
@@ -87,7 +94,7 @@ static noinline int vmalloc_fault(unsigned long address)
87 * an interrupt in the middle of a task switch.. 94 * an interrupt in the middle of a task switch..
88 */ 95 */
89 pgd_k = get_TTB(); 96 pgd_k = get_TTB();
90 pmd_k = vmalloc_sync_one(__va((unsigned long)pgd_k), address); 97 pmd_k = vmalloc_sync_one(pgd_k, address);
91 if (!pmd_k) 98 if (!pmd_k)
92 return -1; 99 return -1;
93 100