diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/microblaze/kernel/hw_exception_handler.S | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index a652addb9321..5d8c3de58b0c 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -562,20 +562,16 @@ ex_handler_done: | |||
562 | */ | 562 | */ |
563 | mfs r11, rpid | 563 | mfs r11, rpid |
564 | nop | 564 | nop |
565 | mfs r3, rear /* Get faulting address */ | ||
566 | nop | ||
567 | /* If we are faulting a kernel address, we have to use the | 565 | /* If we are faulting a kernel address, we have to use the |
568 | * kernel page tables. | 566 | * kernel page tables. |
569 | */ | 567 | */ |
570 | ori r4, r0, CONFIG_KERNEL_START | 568 | ori r5, r0, CONFIG_KERNEL_START |
571 | cmpu r4, r3, r4 | 569 | cmpu r5, r3, r5 |
572 | bgti r4, ex3 | 570 | bgti r5, ex3 |
573 | /* First, check if it was a zone fault (which means a user | 571 | /* First, check if it was a zone fault (which means a user |
574 | * tried to access a kernel or read-protected page - always | 572 | * tried to access a kernel or read-protected page - always |
575 | * a SEGV). All other faults here must be stores, so no | 573 | * a SEGV). All other faults here must be stores, so no |
576 | * need to check ESR_S as well. */ | 574 | * need to check ESR_S as well. */ |
577 | mfs r4, resr | ||
578 | nop | ||
579 | andi r4, r4, 0x800 /* ESR_Z - zone protection */ | 575 | andi r4, r4, 0x800 /* ESR_Z - zone protection */ |
580 | bnei r4, ex2 | 576 | bnei r4, ex2 |
581 | 577 | ||
@@ -590,8 +586,6 @@ ex_handler_done: | |||
590 | * tried to access a kernel or read-protected page - always | 586 | * tried to access a kernel or read-protected page - always |
591 | * a SEGV). All other faults here must be stores, so no | 587 | * a SEGV). All other faults here must be stores, so no |
592 | * need to check ESR_S as well. */ | 588 | * need to check ESR_S as well. */ |
593 | mfs r4, resr | ||
594 | nop | ||
595 | andi r4, r4, 0x800 /* ESR_Z */ | 589 | andi r4, r4, 0x800 /* ESR_Z */ |
596 | bnei r4, ex2 | 590 | bnei r4, ex2 |
597 | /* get current task address */ | 591 | /* get current task address */ |
@@ -666,8 +660,6 @@ ex_handler_done: | |||
666 | * R3 = ESR | 660 | * R3 = ESR |
667 | */ | 661 | */ |
668 | 662 | ||
669 | mfs r3, rear /* Get faulting address */ | ||
670 | nop | ||
671 | RESTORE_STATE; | 663 | RESTORE_STATE; |
672 | bri page_fault_instr_trap | 664 | bri page_fault_instr_trap |
673 | 665 | ||
@@ -682,8 +674,6 @@ ex_handler_done: | |||
682 | */ | 674 | */ |
683 | mfs r11, rpid | 675 | mfs r11, rpid |
684 | nop | 676 | nop |
685 | mfs r3, rear /* Get faulting address */ | ||
686 | nop | ||
687 | 677 | ||
688 | /* If we are faulting a kernel address, we have to use the | 678 | /* If we are faulting a kernel address, we have to use the |
689 | * kernel page tables. */ | 679 | * kernel page tables. */ |
@@ -754,8 +744,6 @@ ex_handler_done: | |||
754 | */ | 744 | */ |
755 | mfs r11, rpid | 745 | mfs r11, rpid |
756 | nop | 746 | nop |
757 | mfs r3, rear /* Get faulting address */ | ||
758 | nop | ||
759 | 747 | ||
760 | /* If we are faulting a kernel address, we have to use the | 748 | /* If we are faulting a kernel address, we have to use the |
761 | * kernel page tables. | 749 | * kernel page tables. |