1
0
Fork 0
alistair23-linux/drivers/base/power
Kevin Hilman 02b26774af PM / Runtime: Allow _put_sync() from interrupts-disabled context
Currently the use of pm_runtime_put_sync() is not safe from
interrupts-disabled context because rpm_idle() will release the
spinlock and enable interrupts for the idle callbacks.  This enables
interrupts during a time where interrupts were expected to be
disabled, and can have strange side effects on drivers that expected
interrupts to be disabled.

This is not a bug since the documentation clearly states that only
_put_sync_suspend() is safe in IRQ-safe mode.

However, pm_runtime_put_sync() could be made safe when in IRQ-safe
mode by releasing the spinlock but not re-enabling interrupts, which
is what this patch aims to do.

Problem was found when using some buggy drivers that set
pm_runtime_irq_safe() and used _put_sync() in interrupts-disabled
context.

Reported-by: Colin Cross <ccross@google.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-08-05 21:45:20 +02:00
..
Makefile PM / Domains: Support for generic I/O PM domains (v8) 2011-07-02 14:29:55 +02:00
clock_ops.c PM: Rename clock management functions 2011-07-02 14:29:57 +02:00
domain.c PM / Domains: Fix pm_genpd_poweron() 2011-08-05 21:45:11 +02:00
generic_ops.c PM: Introduce generic "noirq" callback routines for subsystems (v2) 2011-07-02 14:29:55 +02:00
main.c PM: Limit race conditions between runtime PM and system sleep (v2) 2011-07-06 10:51:58 +02:00
opp.c drivers/base/power/opp.c: fix dev_opp initial value 2011-07-26 16:49:41 -07:00
power.h PM: Do not create wakeup sysfs files for devices that cannot wake up 2011-03-15 00:43:14 +01:00
runtime.c PM / Runtime: Allow _put_sync() from interrupts-disabled context 2011-08-05 21:45:20 +02:00
sysfs.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
trace.c PM: Add "RTC" to PM trace time stamps to avoid confusion 2011-07-15 23:58:19 +02:00
wakeup.c PM / Wakeup: Remove useless synchronize_rcu() call 2011-05-17 23:19:19 +02:00