login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
30
Re: [patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Russ Anderson <rja@...>
Cc: <linux-kernel@...>, <linux-ia64@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>
Subject:
Re: [patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set
Date: Tuesday, October 30, 2007 - 6:22 pm
On Tue, 30 Oct 2007 11:26:57 -0500 Russ Anderson <rja@sgi.com> wrote:
quoted text
> [patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PER_CPU is set > > In __do_IRQ(), the normal case is that IRQ_DISABLED is checked and if > set the handler (handle_IRQ_event()) is not called. > > Earlier in __do_IRQ(), if IRQ_PER_CPU is set the code does not check > IRQ_DISABLED and calls the handler even though IRQ_DISABLED is set. > This behavior seems unintentional. > > One user encountering this behavior is the CPE handler (in > arch/ia64/kernel/mca.c). When the CPE handler encounters too many > CPEs (such as a solid single bit error), it sets up a polling timer > and disables the CPE interrupt (to avoid excessive overhead logging > the stream of single bit errors). disable_irq_nosync() is called > which sets IRQ_DISABLED. The IRQ_PER_CPU flag was previously set > (in ia64_mca_late_init()). The net result is the CPE handler gets > called even though it is marked disabled. > > If the behavior of not checking IRQ_DISABLED when IRQ_PER_CPU is > set is intentional, it would be worthy of a comment describing > the intended behavior. disable_irq_nosync() does call chip->disable() > to provide a chipset specifiec interface for disabling the interrupt, > which avoids this issue when used. > > Comments??? >
It looks right to me.
quoted text
> > -------------------------------------------------------------------- > --- > kernel/irq/handle.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > Index: linus/kernel/irq/handle.c > =================================================================== > --- linus.orig/kernel/irq/handle.c 2007-10-30 09:49:26.000000000 -0500 > +++ linus/kernel/irq/handle.c 2007-10-30 10:23:52.436719688 -0500 > @@ -178,9 +178,11 @@ fastcall unsigned int __do_IRQ(unsigned > */ > if (desc->chip->ack) > desc->chip->ack(irq); > - action_ret = handle_IRQ_event(irq, desc->action); > - if (!noirqdebug) > - note_interrupt(irq, desc, action_ret); > + if (likely(!(desc->status & IRQ_DISABLED))) { > + action_ret = handle_IRQ_event(irq, desc->action); > + if (!noirqdebug) > + note_interrupt(irq, desc, action_ret); > + } > desc->chip->end(irq); > return 1; > }
Alas, I can't remember who wrote (and cares about) the IRQ_PER_CPU support. Oh well. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PER_CP...
, Russ Anderson
, (Tue Oct 30, 12:26 pm)
RE: [patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PE...
, Luck, Tony
, (Wed Oct 31, 12:20 pm)
Re: [patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PE...
, Russ Anderson
, (Wed Oct 31, 4:00 pm)
Re: [patch] __do_IRQ does not check IRQ_DISABLED when IRQ_PE...
, Andrew Morton
, (Tue Oct 30, 6:22 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Amit K. Arora
[RFC] Heads up on sys_fallocate()
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
545 guests
online.
Online users
elinga30
Syndicate