All of lore.kernel.org
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: vagabon.xyz@gmail.com
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] clean up ret_from_{irq,exception}
Date: Sun, 11 Feb 2007 00:40:20 +0900 (JST)	[thread overview]
Message-ID: <20070211.004020.79071872.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <45C8A477.8070906@innova-card.com>

On Tue, 06 Feb 2007 16:53:27 +0100, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> 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.

After this patch, entry.S becomes:

FEXPORT(ret_from_exception)
#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)


Apparently your patch add an additional branch in critical path in
CONFIG_PREEMPT=y case.

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)

---
Atsushi Nemoto

  reply	other threads:[~2007-02-10 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 15:53 [PATCH] clean up ret_from_{irq,exception} Franck Bui-Huu
2007-02-10 15:40 ` Atsushi Nemoto [this message]
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=20070211.004020.79071872.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=vagabon.xyz@gmail.com \
    /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 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.