Re: [PATCH] input: Request threaded-only IRQs with IRQF_ONESHOT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 2, 2012 at 12:11 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> On Mon, 2 Jul 2012, Dmitry Torokhov wrote:
>>
>> This is not very helpful. Why, instead of bailing out, genirq case does
>> not add IRQF_ONESHOT itself to the flags? Then we would not need to
>> alter zillions of drivers.
>
> https://lkml.org/lkml/2012/6/12/151

In particular, just fix the broken drivers.

If you don't have an interrupt-time function, make it very *very*
explicit that your f*cking driver cannot work unless it's
IRQF_ONESHOT. Make it clear IN YOUR DRIVER, rather than depend on some
implicit "the irq layer will fix up your breakage for you".

We've had this "the irq layer will try to work around your bugs"
before. It's a bad idea. It's broken.

If we ever want to know which drivers use IRQF_ONESHOT, we should damn
well be able to just grep for it. Not "oh, any driver that uses a NULL
irq function implicitly also uses IRQF_ONESHOT". None of this
workaround crap. Just fix the drivers, don't make excuses, don't make
it some kind of "we just let things slide this once" crap.

Making the IRQF_ONESHOT explicit does two things:
 - it makes people who read the code *aware* of things
 - if/when you have irq conflicts and two drivers want to attach to
the same interrupt, at least you can see directly from the source what
flags they used (and again, not have to even *think* about it).

Somebody already posted patches that fixed up the drivers. There's
really no reason not to make it a hard rule that a driver has to use
the proper effing flags. And if a driver gives the wrong flags, we
should damn well tell the driver to go away.

                  Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux