lkml.org 
[lkml]   [2015]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH/RFC 00/03] irqchip: renesas-irqc: Fine grained Runtime PM support
From
On Thu, Apr 23, 2015 at 4:44 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Thu, 23 Apr 2015, Geert Uytterhoeven wrote:
>> >> I'm afraid you can't call pm_runtime_get_sync() from these methods, as
>> >> they may be called from interrupt context.
>> >
>> > Ouch. I know the clock framework has prepare/enable separated with
>> > context, but with the irqchip callbacks I suppose no such separation
>>
>> It's not the clock operations, but the pm_runtime operations that cannot be
>> called from interrupt context.
>
> In fact the pm_runtime operations _can_ be called from interrupt
> context, provided the driver has first invoked pm_runtime_irq_safe().
> Of course, this requires that none of the runtime-PM callback routines
> ever sleep or perform a blocking operation.
>
> This is all explained in Documentation/power/runtime_pm.txt (search for
> "irq_safe").

Perhaps that can help. We'll have to give it a try...

I've always found this a bit strange when PM Domains are involved:
pm_runtime_irq_safe(dev) applies to device dev, while the actual callbacks
belong to the PM Domain code (the device's driver doesn't have any).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


\
 
 \ /
  Last update: 2015-04-23 20:01    [W:0.508 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site