Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -3
+1 -1
arch/sh/include/asm/fixmap.h
··· 94 94 * at the top of mem.. 95 95 */ 96 96 #ifdef CONFIG_SUPERH32 97 - #define FIXADDR_TOP (P4SEG - PAGE_SIZE) 97 + #define FIXADDR_TOP (P3_ADDR_MAX - PAGE_SIZE) 98 98 #else 99 99 #define FIXADDR_TOP (0xff000000 - PAGE_SIZE) 100 100 #endif
+2 -2
arch/sh/mm/fault_32.c
··· 168 168 pmd_t *pmd_k; 169 169 pte_t *pte_k; 170 170 171 - /* Make sure we are in vmalloc/module/P3 area: */ 172 - if (!(address >= P3SEG && address < P3_ADDR_MAX)) 171 + /* Make sure we are in vmalloc/module area: */ 172 + if (!is_vmalloc_addr((void *)address)) 173 173 return -1; 174 174 175 175 /*