linux-stable-rt/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
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
attribute_container.c
base.h
bus.c
class.c
core.c
cpu.c
dd.c
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.c
firmware_class.c
hypervisor.c
init.c
isa.c
map.c
memory.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
module.c
node.c
platform.c driver core: Add ability for arch code to setup pdev_archdata 2011-07-08 00:21:35 -05:00
sys.c
syscore.c PM: Reintroduce dropped call to check_wakeup_irqs 2011-07-11 10:51:49 +02:00
topology.c
transport_class.c