Re: [PATCH] clean up ret_from_{irq,exception}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Atsushi,

On 2/10/07, Atsushi Nemoto <anemo@xxxxxxxxxxxxx> wrote:
Maybe this would be better?

#ifdef CONFIG_PREEMPT
FEXPORT(ret_from_irq)
        LONG_S  s0, TI_REGS($28)
FEXPORT(ret_from_exception)
#else
FEXPORT(ret_from_exception)
        local_irq_disable                       # preempt stop
        b       _ret_from_irq
FEXPORT(ret_from_irq)
        LONG_S  s0, TI_REGS($28)
#endif
FEXPORT(_ret_from_irq)


well maybe this one would be more readable:

-- >8 --

diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index f10b6a1..b5d27d5 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -21,23 +21,20 @@
#endif

#ifndef CONFIG_PREEMPT
-	.macro	preempt_stop
-	local_irq_disable
-	.endm
#define resume_kernel	restore_all
+#else
+#define _ret_from_irq	ret_from_exception
#endif

	.text
	.align	5
-FEXPORT(ret_from_irq)
-	LONG_S	s0, TI_REGS($28)
-#ifdef CONFIG_PREEMPT
+#ifndef CONFIG_PREEMPT
FEXPORT(ret_from_exception)
-#else
+	local_irq_disable			# preempt stop
	b	_ret_from_irq
-FEXPORT(ret_from_exception)
-	preempt_stop
#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



--
              Franck


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux