Re: [RFC][PATCH] irq: support IRQ_NESTED_THREAD with non-threaded interrupt handlers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Esben Haabendal
Date: Sunday, June 6, 2010 - 12:50 pm

On Sat, Jun 5, 2010 at 10:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:

Well, given you haven't seen what I have done there, I don't see how you
can be so sure ;-)

The only reason for the buslock in the pca9535 driver is to set the
direction (ie. input) for interrupt pins.  On powerpc, I do this in the map()
irq_chip function. So I don't see the need for buslock on powerpc.


I am not talking about it in general, but for the pca953x driver in particular.
The only thing that is done in the unlock is to set direction, and I don't see
the point in not doing this in earlier.  In most situations, it will
likely be set
even eariler, given that default direction is input, and that it is not uncommon
to set the direction appropriately early in the board init phase.


Which particular problem should I be on the lookout for in pca953x
driver?


Hold your horses, no reason to call it shitty when you haven't even seen
it. I didn't try to start any kind of general duscission for/against genirq
buslock.

Anyway,


No, it was send at the same time, but to the linuxppc-dev.  I do not
see it as utterly wrong, and I hope you will give it a look with an open
mind, not just assuming that it is shitty crap, utterly wrong or horrible
hack even before reading it, thanks ;-)

http://patchwork.ozlabs.org/patch/54717/

It is a longer patch, and I expect that it could be improved quite a
bit, but I really don't see it as a fundanmentally shitty.


Which patch are you refering to?

The patch we are discussing here does not rip out any thing,

It simply adds support for using existing dirvers together
with handle_nested_irq().


Maybe, but I am not so sure.

The phy driver calls disable_irq_nosync(), which is documented as
"This function may be called from IRQ context."
And with disable_irq_nosync() calling chip_bus_lock() and
chip_bus_sync_unlock(), which definitely is not meant
for IRQ context, I got the understanding that it was not
the phy driver that needed fixing, but mroe the generic
buslock stuff, which I did not have the guts to touch, as
I understand it would be easy to get wrong.

So maybe you can help me out here, is disable_irq_nosync()
to be improved here?  It does not seem to be fair to
document that it can be called in IRQ context, and then
have it designed to blow up if done so in combination
with a genirq buslock driver.


How can I disable_irq in interrupt context, with the interrupt handled
by a genirq buslock driver?

/Esben
-- 
Esben Haabendal, Senior Software Consultant
DoréDevelopment ApS, Ved Stranden 1, 9560 Hadsund, DK-Denmark
Phone: +45 51 92 53 93, E-mail: eha@doredevelopment.dk
WWW: http://www.doredevelopment.dk
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH] irq: support IRQ_NESTED_THREAD with non-t ..., Esben Haabendal, (Sun Jun 6, 12:50 pm)