aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-14 02:11:35 -0400
committerPaul Mundt <lethal@linux-sh.org>2012-05-14 02:11:35 -0400
commit20e7c297efeca0861adcca073a0d283da659834b (patch)
treead92c21a2029b7fed58e2be880541231ebcd3b2a
parent9a7b7739f9dba4014fc93531e4c2b6efac41b0a7 (diff)
sh: Ensure fixmap and store queue space can co-exist.
At the moment the top of the fixmap space is calculated from P4SEG, which places it at the end of the store queue space when that API is enabled. Make sure we use P3_ADDR_MAX here instead to find the proper address limit. With this done, it's also possible to switch to the generic vmalloc address range check now that VMALLOC_START/END encapsulate the translatable areas that we care about. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/include/asm/fixmap.h2
-rw-r--r--arch/sh/mm/fault_32.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh/include/asm/fixmap.h b/arch/sh/include/asm/fixmap.h
index bd7e79a12653..5f1ca55bcec8 100644
--- a/arch/sh/include/asm/fixmap.h
+++ b/arch/sh/include/asm/fixmap.h
@@ -94,7 +94,7 @@ extern void __clear_fixmap(enum fixed_addresses idx, pgprot_t flags);
94 * at the top of mem.. 94 * at the top of mem..
95 */ 95 */
96#ifdef CONFIG_SUPERH32 96#ifdef CONFIG_SUPERH32
97#define FIXADDR_TOP (P4SEG - PAGE_SIZE) 97#define FIXADDR_TOP (P3_ADDR_MAX - PAGE_SIZE)
98#else 98#else
99#define FIXADDR_TOP (0xff000000 - PAGE_SIZE) 99#define FIXADDR_TOP (0xff000000 - PAGE_SIZE)
100#endif 100#endif
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index a469b95e88fb..39e291c6b352 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -168,8 +168,8 @@ static noinline int vmalloc_fault(unsigned long address)
168 pmd_t *pmd_k; 168 pmd_t *pmd_k;
169 pte_t *pte_k; 169 pte_t *pte_k;
170 170
171 /* Make sure we are in vmalloc/module/P3 area: */ 171 /* Make sure we are in vmalloc/module area: */
172 if (!(address >= P3SEG && address < P3_ADDR_MAX)) 172 if (!is_vmalloc_addr((void *)address))
173 return -1; 173 return -1;
174 174
175 /* 175 /*