diff options
Diffstat (limited to 'arch/mips/kernel/entry.S')
-rw-r--r-- | arch/mips/kernel/entry.S | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index f10b6a19f8bf..0b78fcbf044a 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S | |||
@@ -21,24 +21,21 @@ | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifndef CONFIG_PREEMPT | 23 | #ifndef CONFIG_PREEMPT |
24 | .macro preempt_stop | ||
25 | local_irq_disable | ||
26 | .endm | ||
27 | #define resume_kernel restore_all | 24 | #define resume_kernel restore_all |
25 | #else | ||
26 | #define __ret_from_irq ret_from_exception | ||
28 | #endif | 27 | #endif |
29 | 28 | ||
30 | .text | 29 | .text |
31 | .align 5 | 30 | .align 5 |
32 | FEXPORT(ret_from_irq) | 31 | #ifndef CONFIG_PREEMPT |
33 | LONG_S s0, TI_REGS($28) | ||
34 | #ifdef CONFIG_PREEMPT | ||
35 | FEXPORT(ret_from_exception) | ||
36 | #else | ||
37 | b _ret_from_irq | ||
38 | FEXPORT(ret_from_exception) | 32 | FEXPORT(ret_from_exception) |
39 | preempt_stop | 33 | local_irq_disable # preempt stop |
34 | b __ret_from_irq | ||
40 | #endif | 35 | #endif |
41 | FEXPORT(_ret_from_irq) | 36 | FEXPORT(ret_from_irq) |
37 | LONG_S s0, TI_REGS($28) | ||
38 | FEXPORT(__ret_from_irq) | ||
42 | LONG_L t0, PT_STATUS(sp) # returning to kernel mode? | 39 | LONG_L t0, PT_STATUS(sp) # returning to kernel mode? |
43 | andi t0, t0, KU_USER | 40 | andi t0, t0, KU_USER |
44 | beqz t0, resume_kernel | 41 | beqz t0, resume_kernel |