From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
u.kleine-koenig@pengutronix.de, a.p.zijlstra@chello.nl,
andrea.gallo@stericsson.com, dbrownell@users.sourceforge.net,
eric.y.miao@gmail.com, hugh.dickins@tiscali.co.uk,
jamie@shareable.org, John Stultz <johnstul@us.ibm.com>,
linux@bohmer.net, nico@marvell.com,
Rusty Russell <rusty@rustcorp.com.au>, Greg KH <greg@kroah.com>,
David Miller <davem@davemloft.net>
Subject: Re: [patch 2/3] genirq: warn about IRQF_SHARED|IRQF_DISABLED at the right place
Date: Sat, 13 Mar 2010 01:59:50 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1003130130090.22855@localhost.localdomain> (raw)
In-Reply-To: <20100312155015.090ba541.akpm@linux-foundation.org>
Back to LKML and Cc'ed a few more folks
On Fri, 12 Mar 2010, Andrew Morton wrote:
> On Sat, 13 Mar 2010 00:32:28 +0100 (CET)
> Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > On Thu, 11 Mar 2010, akpm@linux-foundation.org wrote:
> >
> > > From: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > >
> > > For shared irqs IRQF_DISABLED is only guaranteed for the first handler.
> > > So only warn starting at the second registration.
> > >
> > > The warning is moved to __setup_irq having the additional benefit of
> > > catching actions registered using setup_irq not only register_irq.
> > >
> > > This doesn't fix the cases where setup order is wrong but it should report
> > > the broken cases more reliably.
> >
> > Please drop this. It's just useless shuffling off code for no real
> > benefit.
> >
>
> I think that warning on the second-registered IRQ was probably a
> mistake. Because registering just the first IRQF_DISABLED handler only
> works by luck, and is vlunerable to someone else adding a handler later.
>
> But extending the warning so that it also covers setup_irq() seems
> sensible enough.
Well, this is a crappy concept anyway and it would be way more
worthwhile to figure out why we need IRQF_DISABLED at all.
An irq handler should just run always with irqs disabled. The flag is
just there to deal with crappy drivers which take hundreds of
microseconds or more in their interrupt service routines.
hint: IDE, USB ...
I'm simply refusing to apply patches which just shuffle code around to
warn about obscure use cases instead of tackling the real problem of
long running irq handlers which prevent us to get rid of IRQF_DISABLED
and just run all interrupt handlers with irqs disabled. Getting rid of
that would also simplify stuff which needs to be aware of reentrancy
now.
Thanks,
tglx
next parent reply other threads:[~2010-03-13 1:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201003112208.o2BM8wJU013575@imap1.linux-foundation.org>
[not found] ` <alpine.LFD.2.00.1003130031300.22855@localhost.localdomain>
[not found] ` <20100312155015.090ba541.akpm@linux-foundation.org>
2010-03-13 0:59 ` Thomas Gleixner [this message]
2010-03-12 22:14 ` Andrew Morton
2010-03-15 2:52 ` Jamie Lokier
2010-03-15 3:25 ` Andrew Morton
2010-03-15 8:38 ` Uwe Kleine-König
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=alpine.LFD.2.00.1003130130090.22855@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=andrea.gallo@stericsson.com \
--cc=davem@davemloft.net \
--cc=dbrownell@users.sourceforge.net \
--cc=eric.y.miao@gmail.com \
--cc=greg@kroah.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=jamie@shareable.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@bohmer.net \
--cc=mingo@elte.hu \
--cc=nico@marvell.com \
--cc=rusty@rustcorp.com.au \
--cc=u.kleine-koenig@pengutronix.de \
/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
Powered by JetHome