X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fentry.S;h=0b78fcbf044ab563453850fe8d404ca3615b6053;hb=6e96783f586cc0a64651087cb518209a8577123f;hp=01e7fa86aa43d588b7ed8d8e70af403067d2c9e2;hpb=51bece910d2b0aca64cd3dee9fa2a8aa7feeadd9;p=linux-2.6-omap-h63xx.git diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index 01e7fa86aa4..0b78fcbf044 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -20,21 +20,22 @@ #include #endif -#ifdef CONFIG_PREEMPT - .macro preempt_stop - .endm -#else - .macro preempt_stop - local_irq_disable - .endm +#ifndef CONFIG_PREEMPT #define resume_kernel restore_all +#else +#define __ret_from_irq ret_from_exception #endif .text .align 5 +#ifndef CONFIG_PREEMPT FEXPORT(ret_from_exception) - preempt_stop + local_irq_disable # preempt stop + b __ret_from_irq +#endif FEXPORT(ret_from_irq) + LONG_S s0, TI_REGS($28) +FEXPORT(__ret_from_irq) LONG_L t0, PT_STATUS(sp) # returning to kernel mode? andi t0, t0, KU_USER beqz t0, resume_kernel @@ -79,8 +80,10 @@ FEXPORT(syscall_exit) FEXPORT(restore_all) # restore full frame #ifdef CONFIG_MIPS_MT_SMTC /* Detect and execute deferred IPI "interrupts" */ - move a0,sp + LONG_L s0, TI_REGS($28) + LONG_S sp, TI_REGS($28) jal deferred_smtc_ipi + LONG_S s0, TI_REGS($28) /* Re-arm any temporarily masked interrupts not explicitly "acked" */ mfc0 v0, CP0_TCSTATUS ori v1, v0, TCSTATUS_IXMT @@ -113,6 +116,21 @@ FEXPORT(restore_all) # restore full frame RESTORE_AT RESTORE_STATIC FEXPORT(restore_partial) # restore partial frame +#ifdef CONFIG_TRACE_IRQFLAGS + SAVE_STATIC + SAVE_AT + SAVE_TEMP + LONG_L v0, PT_STATUS(sp) + and v0, 1 + beqz v0, 1f + jal trace_hardirqs_on + b 2f +1: jal trace_hardirqs_off +2: + RESTORE_TEMP + RESTORE_AT + RESTORE_STATIC +#endif RESTORE_SOME RESTORE_SP_AND_RET .set at