All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clean up ret_from_{irq,exception}
@ 2007-02-06 15:53 Franck Bui-Huu
  2007-02-10 15:40 ` Atsushi Nemoto
  0 siblings, 1 reply; 7+ messages in thread
From: Franck Bui-Huu @ 2007-02-06 15:53 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

From: Franck Bui-Huu <fbuihuu@gmail.com>

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@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-12 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-06 15:53 [PATCH] clean up ret_from_{irq,exception} Franck Bui-Huu
2007-02-10 15:40 ` Atsushi Nemoto
2007-02-12  8:44   ` Franck Bui-Huu
2007-02-12 14:45     ` Atsushi Nemoto
2007-02-12 15:55       ` Franck Bui-Huu
2007-02-12 16:51       ` Maciej W. Rozycki
2007-02-12 17:01         ` Atsushi Nemoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.