summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-18 20:01:16 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-05-18 20:01:16 +0900
commitd8fd35fc586f74b2defe011d3a2bfb507871a407 (patch)
treeb2e897aa01fe879c338880a5b024441db623a01b /arch/sh/mm
parentc3e0af98792f9f1c840dc969f883e46d0ced3e00 (diff)
downloadop-kernel-dev-d8fd35fc586f74b2defe011d3a2bfb507871a407.zip
op-kernel-dev-d8fd35fc586f74b2defe011d3a2bfb507871a407.tar.gz
sh64: Fix up vmalloc fault range check.
With the previous attempt reverted this switches to conditionalizing the end address. Nominally VMALLOC_END, but extended for P3_ADDR_MAX in the store queue case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/fault.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index b0345f0..1fc25d8 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -160,6 +160,12 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
return pmd_k;
}
+#ifdef CONFIG_SH_STORE_QUEUES
+#define __FAULT_ADDR_LIMIT P3_ADDR_MAX
+#else
+#define __FAULT_ADDR_LIMIT VMALLOC_END
+#endif
+
/*
* Handle a fault on the vmalloc or module mapping area
*/
@@ -170,7 +176,7 @@ static noinline int vmalloc_fault(unsigned long address)
pte_t *pte_k;
/* Make sure we are in vmalloc/module/P3 area: */
- if (!(address >= P3SEG && address < P3_ADDR_MAX))
+ if (!(address >= VMALLOC_START && address < __FAULT_ADDR_LIMIT))
return -1;
/*
OpenPOWER on IntegriCloud