kernel-ark/drivers/base
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
..
power PM / Runtime: Allow _put_sync() from interrupts-disabled context 2011-08-05 21:45:20 +02:00
regmap regmap: Add SPI bus support 2011-07-23 07:56:59 +01:00
attribute_container.c
base.h PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
bus.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-01-13 10:05:56 -08:00
class.c
core.c drivers/base/core.c: Fixed brace coding style issue. 2011-04-22 17:06:30 -07:00
cpu.c
dd.c Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-05-19 18:24:11 -07:00
devres.c
devtmpfs.c devtmpfs: missing initialialization in never-hit case 2011-07-27 22:27:33 -04:00
dma-coherent.c
dma-mapping.c
driver.c
firmware_class.c PM: Print a warning if firmware is requested when tasks are frozen 2011-05-17 23:19:17 +02:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-07-25 23:06:24 -07:00
Makefile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap 2011-07-23 11:14:47 -07:00
map.c
memory.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
module.c
node.c mm: per-node vmstat: show proper vmstats 2011-05-25 08:39:07 -07:00
platform.c driver core: Add ability for arch code to setup pdev_archdata 2011-07-08 00:21:35 -05:00
sys.c PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
syscore.c PM: Reintroduce dropped call to check_wakeup_irqs 2011-07-11 10:51:49 +02:00
topology.c
transport_class.c