diff options
-rw-r--r-- | arch/sh/mm/fault.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index b0345f09c197..1fc25d85e515 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) | |||
160 | return pmd_k; | 160 | return pmd_k; |
161 | } | 161 | } |
162 | 162 | ||
163 | #ifdef CONFIG_SH_STORE_QUEUES | ||
164 | #define __FAULT_ADDR_LIMIT P3_ADDR_MAX | ||
165 | #else | ||
166 | #define __FAULT_ADDR_LIMIT VMALLOC_END | ||
167 | #endif | ||
168 | |||
163 | /* | 169 | /* |
164 | * Handle a fault on the vmalloc or module mapping area | 170 | * Handle a fault on the vmalloc or module mapping area |
165 | */ | 171 | */ |
@@ -170,7 +176,7 @@ static noinline int vmalloc_fault(unsigned long address) | |||
170 | pte_t *pte_k; | 176 | pte_t *pte_k; |
171 | 177 | ||
172 | /* Make sure we are in vmalloc/module/P3 area: */ | 178 | /* Make sure we are in vmalloc/module/P3 area: */ |
173 | if (!(address >= P3SEG && address < P3_ADDR_MAX)) | 179 | if (!(address >= VMALLOC_START && address < __FAULT_ADDR_LIMIT)) |
174 | return -1; | 180 | return -1; |
175 | 181 | ||
176 | /* | 182 | /* |