Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH] clean up ret_from_{irq,exception}
Date: Tue, 06 Feb 2007 16:53:27 +0100	[thread overview]
Message-ID: <45C8A477.8070906@innova-card.com> (raw)

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

             reply	other threads:[~2007-02-06 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 15:53 Franck Bui-Huu [this message]
2007-02-10 15:40 ` [PATCH] clean up ret_from_{irq,exception} 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45C8A477.8070906@innova-card.com \
    --to=vagabon.xyz@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox