summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@st.com>2018-12-17 17:22:14 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2018-12-18 18:38:31 +0300
commitfb94109b764e7676fa63834b9033ba97175877a0 (patch)
treebff2fc426cce4fb2ef34387358bde655bb901457 /drivers/base
parent897898a69451dc31950d200c0fcdba24428a6482 (diff)
downloadlinux-fb94109b764e7676fa63834b9033ba97175877a0.tar.xz
irqchip/stm32: protect configuration registers with hwspinlock
If a hwspinlock is defined in device tree use it to protect configuration registers. Do not request for hwspinlock during the exti driver init since the hwspinlock driver is not probed yet at that stage and the exti driver does not support deferred probe. Instead of this, postpone the hwspinlock request at the first time the hwspinlock is actually needed. Use the hwspin_trylock_raw() API which is the most appropriated here Indeed: - hwspin_lock_() calls are under spin_lock protection (chip_data->rlock or gc->lock). - the _timeout() API relies on jiffies count which won't work if IRQs are disabled which is the case here (a large part of the IRQ setup is done atomically (see irq/manage.c)) As a consequence implement the retry/timeout lock from here. And since all of this is done atomically, reduce the timeout delay to 1 ms. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/base')
0 files changed, 0 insertions, 0 deletions