[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120301210020.GC19274@n2100.arm.linux.org.uk>
Date: Thu, 1 Mar 2012 21:00:20 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Arnd Bergmann <arnd@...db.de>
Cc: Stephen Warren <swarren@...dia.com>, Alan Ott <alan@...nal11.us>,
Colin Cross <ccross@...roid.com>,
Olof Johansson <olof@...om.net>,
Grant Likely <grant.likely@...retlab.ca>,
Linus Walleij <linus.walleij@...ricsson.com>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 8/8] ARM: tegra: HACK: remove set_irq_flags() from
driver
On Thu, Mar 01, 2012 at 08:38:27PM +0000, Arnd Bergmann wrote:
> On Thursday 01 March 2012, Stephen Warren wrote:
> >
> > Alan Ott wrote at Thursday, March 01, 2012 12:27 PM:
> > > From: Arnd Bergmann <arnd@...db.de>
> > >
> > > The driver should not call set_irq_flags itself, and
> >
> > Probably true in this case.
> >
> > > cannot do this from a loadable module.
> >
> > I hope that's not true; grep'ing the entire of drivers/ shows a bunch
> > of drivers calling this function, and many look like they'd be reasonable
> > as module.
>
> The drivers that I can see using it are for the most part implementing
> irq controllers by themselves, which is different from merely using an
> interrupt.
>
> There are three exceptions today:
>
> arnd@...ppe2:~/linux-arm$ git grep -l set_irq_flags drivers/ | xargs grep -L irq_chip
> drivers/tty/serial/serial_ks8695.c
Setting NOAUTOEN should be done elsewhere (in platform code.) Better
still, fixing genirq to allow request_irq() to permit the interrupt
to be requested *without enabling it* would be a step forwards. I
thought my original ARM IRQ code did that.
> drivers/tty/serial/sirfsoc_uart.c
Same issue, so same comments.
> drivers/usb/host/ehci-tegra.c
This one should not be there. Having drivers mark IRQs as being
requestable when the whole point of the flag is to stop request_irq()
being used on non-initialized interrupts is just plain stupid.
> > From what little I understand of this, any irq_chip is going to call
> > that function after setting up any child/cascaded IRQs, and I assume
> > that irq_chips can be in modules.
>
> But the function is not exported. I guess if we want to allow
> irq_chips in loadable modules, we could export it, but I don't see
> how it could ever have worked so far.
genirq does not permit flow handlers in modules - I suspect that's
because it's pretty hard to remove them safely from the system without
a lot of effort. Certainly, a whole bunch of genirq functions which
are required to implement external flow handlers etc aren't exported.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists