diff options
author | Michal Simek <monstr@monstr.eu> | 2010-06-22 08:05:43 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-08-04 04:22:45 -0400 |
commit | 96014cc39bffe04429bcd143aa7bbde81f659ee4 (patch) | |
tree | 4e665aa0455408f7a3fe7e925ca8597fe4ac8cc9 /arch/microblaze/kernel/entry.S | |
parent | 5c0d72b1b35fd0dad7dd70a114df068eadcc1b16 (diff) |
microblaze: Move BIP setup to the end of ret_from_trap/ret_from_exc
We don't need to protect by BIP whole ret_from_trap/ret_from_exc code.
Only restoring from user/hw exception should be covered.
If BIP is setup, IRQ can't occur.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/entry.S')
-rw-r--r-- | arch/microblaze/kernel/entry.S | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index 9a98f70e4c30..4a6cb1d68dd4 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S | |||
@@ -381,7 +381,6 @@ C_ENTRY(_user_exception): | |||
381 | /* Entry point used to return from a syscall/trap */ | 381 | /* Entry point used to return from a syscall/trap */ |
382 | /* We re-enable BIP bit before state restore */ | 382 | /* We re-enable BIP bit before state restore */ |
383 | C_ENTRY(ret_from_trap): | 383 | C_ENTRY(ret_from_trap): |
384 | set_bip; /* Ints masked for state restore*/ | ||
385 | swi r3, r1, PTO + PT_R3 | 384 | swi r3, r1, PTO + PT_R3 |
386 | swi r4, r1, PTO + PT_R4 | 385 | swi r4, r1, PTO + PT_R4 |
387 | 386 | ||
@@ -423,7 +422,7 @@ C_ENTRY(ret_from_trap): | |||
423 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ | 422 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ |
424 | 423 | ||
425 | /* Finally, return to user state. */ | 424 | /* Finally, return to user state. */ |
426 | 1: | 425 | 1: set_bip; /* Ints masked for state restore */ |
427 | swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ | 426 | swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ |
428 | VM_OFF; | 427 | VM_OFF; |
429 | tophys(r1,r1); | 428 | tophys(r1,r1); |
@@ -433,7 +432,8 @@ C_ENTRY(ret_from_trap): | |||
433 | bri 6f; | 432 | bri 6f; |
434 | 433 | ||
435 | /* Return to kernel state. */ | 434 | /* Return to kernel state. */ |
436 | 2: VM_OFF; | 435 | 2: set_bip; /* Ints masked for state restore */ |
436 | VM_OFF; | ||
437 | tophys(r1,r1); | 437 | tophys(r1,r1); |
438 | RESTORE_REGS; | 438 | RESTORE_REGS; |
439 | addik r1, r1, STATE_SAVE_SIZE /* Clean up stack space. */ | 439 | addik r1, r1, STATE_SAVE_SIZE /* Clean up stack space. */ |
@@ -647,7 +647,6 @@ C_ENTRY(page_fault_instr_trap): | |||
647 | 647 | ||
648 | /* Entry point used to return from an exception. */ | 648 | /* Entry point used to return from an exception. */ |
649 | C_ENTRY(ret_from_exc): | 649 | C_ENTRY(ret_from_exc): |
650 | set_bip; /* Ints masked for state restore*/ | ||
651 | lwi r11, r1, PTO+PT_MODE; | 650 | lwi r11, r1, PTO+PT_MODE; |
652 | bnei r11, 2f; /* See if returning to kernel mode, */ | 651 | bnei r11, 2f; /* See if returning to kernel mode, */ |
653 | /* ... if so, skip resched &c. */ | 652 | /* ... if so, skip resched &c. */ |
@@ -686,7 +685,7 @@ C_ENTRY(ret_from_exc): | |||
686 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ | 685 | add r6, r0, r0; /* Arg 2: sigset_t *oldset */ |
687 | 686 | ||
688 | /* Finally, return to user state. */ | 687 | /* Finally, return to user state. */ |
689 | 1: | 688 | 1: set_bip; /* Ints masked for state restore */ |
690 | swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ | 689 | swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ |
691 | VM_OFF; | 690 | VM_OFF; |
692 | tophys(r1,r1); | 691 | tophys(r1,r1); |
@@ -697,7 +696,8 @@ C_ENTRY(ret_from_exc): | |||
697 | lwi r1, r1, PT_R1 - PT_SIZE; /* Restore user stack pointer. */ | 696 | lwi r1, r1, PT_R1 - PT_SIZE; /* Restore user stack pointer. */ |
698 | bri 6f; | 697 | bri 6f; |
699 | /* Return to kernel state. */ | 698 | /* Return to kernel state. */ |
700 | 2: VM_OFF; | 699 | 2: set_bip; /* Ints masked for state restore */ |
700 | VM_OFF; | ||
701 | tophys(r1,r1); | 701 | tophys(r1,r1); |
702 | RESTORE_REGS; | 702 | RESTORE_REGS; |
703 | addik r1, r1, STATE_SAVE_SIZE /* Clean up stack space. */ | 703 | addik r1, r1, STATE_SAVE_SIZE /* Clean up stack space. */ |