diff options
Diffstat (limited to 'arch/ppc64/mm/hash_utils.c')
-rw-r--r-- | arch/ppc64/mm/hash_utils.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c index e48be12f518c..0a0f97008d02 100644 --- a/arch/ppc64/mm/hash_utils.c +++ b/arch/ppc64/mm/hash_utils.c | |||
@@ -298,24 +298,23 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
298 | int local = 0; | 298 | int local = 0; |
299 | cpumask_t tmp; | 299 | cpumask_t tmp; |
300 | 300 | ||
301 | if ((ea & ~REGION_MASK) > EADDR_MASK) | ||
302 | return 1; | ||
303 | |||
301 | switch (REGION_ID(ea)) { | 304 | switch (REGION_ID(ea)) { |
302 | case USER_REGION_ID: | 305 | case USER_REGION_ID: |
303 | user_region = 1; | 306 | user_region = 1; |
304 | mm = current->mm; | 307 | mm = current->mm; |
305 | if ((ea > USER_END) || (! mm)) | 308 | if (! mm) |
306 | return 1; | 309 | return 1; |
307 | 310 | ||
308 | vsid = get_vsid(mm->context.id, ea); | 311 | vsid = get_vsid(mm->context.id, ea); |
309 | break; | 312 | break; |
310 | case IO_REGION_ID: | 313 | case IO_REGION_ID: |
311 | if (ea > IMALLOC_END) | ||
312 | return 1; | ||
313 | mm = &ioremap_mm; | 314 | mm = &ioremap_mm; |
314 | vsid = get_kernel_vsid(ea); | 315 | vsid = get_kernel_vsid(ea); |
315 | break; | 316 | break; |
316 | case VMALLOC_REGION_ID: | 317 | case VMALLOC_REGION_ID: |
317 | if (ea > VMALLOC_END) | ||
318 | return 1; | ||
319 | mm = &init_mm; | 318 | mm = &init_mm; |
320 | vsid = get_kernel_vsid(ea); | 319 | vsid = get_kernel_vsid(ea); |
321 | break; | 320 | break; |
@@ -362,7 +361,7 @@ void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte, | |||
362 | unsigned long vsid, vpn, va, hash, secondary, slot; | 361 | unsigned long vsid, vpn, va, hash, secondary, slot; |
363 | unsigned long huge = pte_huge(pte); | 362 | unsigned long huge = pte_huge(pte); |
364 | 363 | ||
365 | if ((ea >= USER_START) && (ea <= USER_END)) | 364 | if (ea < KERNELBASE) |
366 | vsid = get_vsid(context, ea); | 365 | vsid = get_vsid(context, ea); |
367 | else | 366 | else |
368 | vsid = get_kernel_vsid(ea); | 367 | vsid = get_kernel_vsid(ea); |