From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Christoph Hellwig <hch@arm.linux.org.uk>,
akpm@osdl.org, spyro@f2s.com, linux390@de.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irq_enter/irq_exit consolidation
Date: Sun, 12 Sep 2004 12:44:48 +0100 [thread overview]
Message-ID: <20040912124448.A13676@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20040912112554.GA32550@lst.de>; from hch@lst.de on Sun, Sep 12, 2004 at 01:25:54PM +0200
On Sun, Sep 12, 2004 at 01:25:54PM +0200, Christoph Hellwig wrote:
> Move irq_enter/irq_exit from <asm/hardirq.h> to <linux/hardirq.h>.
> There some fishy things going on with the do_softirq invokation on
> arm, arm26 and s390.
>
> arm calls __do_softirq directly without local irq disabling which looks
> like a real bug to me.
The ARM interrupt subsystem guarantees that local IRQs are disabled
prior to irq_exit() being invoked. This is a must for reasons other
than softirq semantics - hardware IRQ controllers may require a
nonatomic read-modify-write to update their IRQ masking state.
This guarantee must also exist on every other architecture, otherwise:
> ===== include/linux/hardirq.h 1.1 vs edited =====
> --- 1.1/include/linux/hardirq.h 2004-09-08 08:32:57 +02:00
> +++ edited/include/linux/hardirq.h 2004-09-11 21:26:28 +02:00
> +#define irq_exit() \
> +do { \
> + preempt_count() -= IRQ_EXIT_OFFSET; \
would be buggy - it's an inherently non-atomic operation. Not only that
but the behaviour of nested interrupts would change depending on whether
they interrupted before or after preempt count has been updated.
So maybe every other architecture except ARM is buggy? 8)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2004-09-12 11:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-12 11:25 [PATCH] irq_enter/irq_exit consolidation Christoph Hellwig
2004-09-12 11:44 ` Russell King [this message]
2004-09-12 22:57 ` David S. Miller
2004-09-13 8:10 ` Russell King
-- strict thread matches above, loose matches on Subject: below --
2004-09-13 13:02 Martin Schwidefsky
2004-09-14 18:31 ` Christoph Hellwig
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=20040912124448.A13676@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=akpm@osdl.org \
--cc=hch@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=spyro@f2s.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox