提交 20e7c297 编写于 作者: P Paul Mundt

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: NPaul Mundt <lethal@linux-sh.org>
上级 9a7b7739
...@@ -94,7 +94,7 @@ extern void __clear_fixmap(enum fixed_addresses idx, pgprot_t flags); ...@@ -94,7 +94,7 @@ extern void __clear_fixmap(enum fixed_addresses idx, pgprot_t flags);
* at the top of mem.. * at the top of mem..
*/ */
#ifdef CONFIG_SUPERH32 #ifdef CONFIG_SUPERH32
#define FIXADDR_TOP (P4SEG - PAGE_SIZE) #define FIXADDR_TOP (P3_ADDR_MAX - PAGE_SIZE)
#else #else
#define FIXADDR_TOP (0xff000000 - PAGE_SIZE) #define FIXADDR_TOP (0xff000000 - PAGE_SIZE)
#endif #endif
......
...@@ -168,8 +168,8 @@ static noinline int vmalloc_fault(unsigned long address) ...@@ -168,8 +168,8 @@ static noinline int vmalloc_fault(unsigned long address)
pmd_t *pmd_k; pmd_t *pmd_k;
pte_t *pte_k; pte_t *pte_k;
/* Make sure we are in vmalloc/module/P3 area: */ /* Make sure we are in vmalloc/module area: */
if (!(address >= P3SEG && address < P3_ADDR_MAX)) if (!is_vmalloc_addr((void *)address))
return -1; return -1;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册