diff options
Diffstat (limited to 'arch/m32r/mm/fault.c')
-rw-r--r-- | arch/m32r/mm/fault.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 7274b47f4c22..b8ec002aef8e 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -188,7 +188,6 @@ good_area: | |||
188 | if ((error_code & ACE_INSTRUCTION) && !(vma->vm_flags & VM_EXEC)) | 188 | if ((error_code & ACE_INSTRUCTION) && !(vma->vm_flags & VM_EXEC)) |
189 | goto bad_area; | 189 | goto bad_area; |
190 | 190 | ||
191 | survive: | ||
192 | /* | 191 | /* |
193 | * If for any reason at all we couldn't handle the fault, | 192 | * If for any reason at all we couldn't handle the fault, |
194 | * make sure we exit gracefully rather than endlessly redo | 193 | * make sure we exit gracefully rather than endlessly redo |
@@ -271,15 +270,10 @@ no_context: | |||
271 | */ | 270 | */ |
272 | out_of_memory: | 271 | out_of_memory: |
273 | up_read(&mm->mmap_sem); | 272 | up_read(&mm->mmap_sem); |
274 | if (is_global_init(tsk)) { | 273 | if (!(error_code & ACE_USERMODE)) |
275 | yield(); | 274 | goto no_context; |
276 | down_read(&mm->mmap_sem); | 275 | pagefault_out_of_memory(); |
277 | goto survive; | 276 | return; |
278 | } | ||
279 | printk("VM: killing process %s\n", tsk->comm); | ||
280 | if (error_code & ACE_USERMODE) | ||
281 | do_group_exit(SIGKILL); | ||
282 | goto no_context; | ||
283 | 277 | ||
284 | do_sigbus: | 278 | do_sigbus: |
285 | up_read(&mm->mmap_sem); | 279 | up_read(&mm->mmap_sem); |
@@ -336,7 +330,7 @@ vmalloc_fault: | |||
336 | 330 | ||
337 | addr = (address & PAGE_MASK); | 331 | addr = (address & PAGE_MASK); |
338 | set_thread_fault_code(error_code); | 332 | set_thread_fault_code(error_code); |
339 | update_mmu_cache(NULL, addr, *pte_k); | 333 | update_mmu_cache(NULL, addr, pte_k); |
340 | set_thread_fault_code(0); | 334 | set_thread_fault_code(0); |
341 | return; | 335 | return; |
342 | } | 336 | } |
@@ -349,7 +343,7 @@ vmalloc_fault: | |||
349 | #define ITLB_END (unsigned long *)(ITLB_BASE + (NR_TLB_ENTRIES * 8)) | 343 | #define ITLB_END (unsigned long *)(ITLB_BASE + (NR_TLB_ENTRIES * 8)) |
350 | #define DTLB_END (unsigned long *)(DTLB_BASE + (NR_TLB_ENTRIES * 8)) | 344 | #define DTLB_END (unsigned long *)(DTLB_BASE + (NR_TLB_ENTRIES * 8)) |
351 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, | 345 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, |
352 | pte_t pte) | 346 | pte_t *ptep) |
353 | { | 347 | { |
354 | volatile unsigned long *entry1, *entry2; | 348 | volatile unsigned long *entry1, *entry2; |
355 | unsigned long pte_data, flags; | 349 | unsigned long pte_data, flags; |
@@ -365,7 +359,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, | |||
365 | 359 | ||
366 | vaddr = (vaddr & PAGE_MASK) | get_asid(); | 360 | vaddr = (vaddr & PAGE_MASK) | get_asid(); |
367 | 361 | ||
368 | pte_data = pte_val(pte); | 362 | pte_data = pte_val(*ptep); |
369 | 363 | ||
370 | #ifdef CONFIG_CHIP_OPSP | 364 | #ifdef CONFIG_CHIP_OPSP |
371 | entry1 = (unsigned long *)ITLB_BASE; | 365 | entry1 = (unsigned long *)ITLB_BASE; |