diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-07-21 18:26:51 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-07-27 14:49:00 +0200 |
commit | 4dbada2be460dc5568fa27784ef626232c28061f (patch) | |
tree | 0ae9c757c2a79ebb55a4ddcb81e0740b6f5d3a4f /samples/hidraw | |
parent | d1aceb80c685b0735268fba296523f5d7264ff22 (diff) | |
download | lwn-4dbada2be460dc5568fa27784ef626232c28061f.tar.gz lwn-4dbada2be460dc5568fa27784ef626232c28061f.zip |
gpio: omap: use raw locks for locking
This patch converts gpio_bank.lock from a spin_lock into a
raw_spin_lock. The call path is to access this lock is always under a
raw_spin_lock, for instance
- __setup_irq() holds &desc->lock with irq off
+ __irq_set_trigger()
+ omap_gpio_irq_type()
- handle_level_irq() (runs with irqs off therefore raw locks)
+ mask_ack_irq()
+ omap_gpio_mask_irq()
This fixes the obvious backtrace on -RT. However the locking vs context
is not and this is not limited to -RT:
- omap_gpio_irq_type() is called with IRQ off and has an conditional
call to pm_runtime_get_sync() which may sleep. Either it may happen or
it may not happen but pm_runtime_get_sync() should not be called with
irqs off.
- omap_gpio_debounce() is holding the lock with IRQs off.
+ omap2_set_gpio_debounce()
+ clk_prepare_enable()
+ clk_prepare() this one might sleep.
The number of users of gpiod_set_debounce() / gpio_set_debounce()
looks low but still this is not good.
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'samples/hidraw')
0 files changed, 0 insertions, 0 deletions