linux-mips
[Top] [All Lists]

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

To: "Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] clean up ret_from_{irq,exception}
From: "Franck Bui-Huu" <vagabon.xyz@gmail.com>
Date: Mon, 12 Feb 2007 09:44:33 +0100
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NuVuowrc3P+Ukzo8i85eqAV2WTVoCRxZgIrNZ04KtF51UYCtAJNOp7Lr0ZLFRSDzF9XtPkG4YDmPXBDeDeP13kVH2M1stzm3QvbXFn5yFcZhUcfXSmO+9c5CU0TS1D45nG2DYTRQbNUEi9ZTf4BGzIf+qcO+QPKu+dihkVpAHMA=
In-reply-to: <20070211.004020.79071872.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <45C8A477.8070906@innova-card.com> <20070211.004020.79071872.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
Hi Atsushi,

On 2/10/07, Atsushi Nemoto <anemo@mba.ocn.ne.jp> 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

<Prev in Thread] Current Thread [Next in Thread>