lkml.org 
[lkml]   [2017]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT pull] irq updates for 4.13
* Thomas Gleixner <tglx@linutronix.de> [170711 09:20]:
> On Tue, 11 Jul 2017, Linus Torvalds wrote:
>
> > On Tue, Jul 11, 2017 at 7:41 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > >
> > > Ah. Now that makes sense.
> > >
> > > Unpatched the ordering is:
> > >
> > > chip_bus_lock(desc);
> > > irq_request_resources(desc);
> >
> > I *looked* at that ordering and then went "Naah, that makes no sense".
> >
> > But if that's the only issue, how about we just re-order those things
> > - we still don't need to move the irq_request_resources() into the
> > spinlock, we just move it to below the chip_bus_lock().
> >
> > IOW, something like the (COMPLETELY UNTEESTED!) attached patch.
> >
> > This assumes that the chip_bus_lock() thing is still ok for the RT
> > case, but it looks like it might be: the only other one I looked at
> > (apart from the gpio-omap one) used a mutex.
>
> I looked through all of them and the only special case is gpio-omap.
>
> What I do not understand here is that we have already power management
> around all of that.
>
> irq_chip_pm_get(&desc->irq_data);
> ...
> chip_bus_lock(desc);
> ...
> chip_bus_unlock_sync(desc);
> ...
> irq_chip_pm_put(&desc->irq_data);
>
> So why is that not sufficient and needs extra magic in that GPIO driver?

Yeah it seems we should eventually be able to use irq_chip_pm_get()
like Grygorii just explained.

But aren't we currently calling chip functions with irq_request_resources()
outside the chip_bus_lock() too in addition to the gpio-omap runtime PM
issue? It seems that the patch from Linus fixes that, no?

Regards,

Tony

\
 
 \ /
  Last update: 2017-07-11 18:35    [W:0.125 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site