[PATCH] clean up ret_from_{irq,exception}

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

 



From: Franck Bui-Huu <fbuihuu@xxxxxxxxx>

This patch makes these routines a lot more readable whatever
the value of CONFIG_PREEMPT.

It also moves one branch instruction from ret_from_irq()
to ret_from_exception(). Therefore we favour the return
from irq path which should be more common than the other
one.

Signed-off-by: Franck Bui-Huu <fbuihuu@xxxxxxxxx>
---
 arch/mips/kernel/entry.S |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index f10b6a1..571029b 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -21,23 +21,18 @@
 #endif
 
 #ifndef CONFIG_PREEMPT
-	.macro	preempt_stop
-	local_irq_disable
-	.endm
 #define resume_kernel	restore_all
 #endif
 
 	.text
 	.align	5
-FEXPORT(ret_from_irq)
-	LONG_S	s0, TI_REGS($28)
-#ifdef CONFIG_PREEMPT
-FEXPORT(ret_from_exception)
-#else
-	b	_ret_from_irq
 FEXPORT(ret_from_exception)
-	preempt_stop
+#ifndef CONFIG_PREEMPT
+	local_irq_disable			# preempt stop
 #endif
+	b	_ret_from_irq
+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
-- 
1.4.4.3.ge6d4



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

  Powered by Linux