diff options
| author | Ju Nan <junan76@163.com> | 2026-08-21 10:47:57 +0800 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-09-04 16:19:04 +0200 |
| commit | d31fbbade43f880b7e59e2b3a72722fe2725d93f (patch) | |
| tree | b5c17fe512a37ec3c35bf07c10b0f005aad73f13 /drivers/fpga/dfl-afu-dma-region.c | |
| parent | e67091609cf85962f64391c1b0f93d4cbfcd4e22 (diff) | |
| download | linux-d31fbbade43f880b7e59e2b3a72722fe2725d93f.tar.gz linux-d31fbbade43f880b7e59e2b3a72722fe2725d93f.zip | |
irqchip/stm32mp-exti: Fix the unit of the hwspinlock timeout
HWSPNLCK_TIMEOUT is passed to hwspin_lock_timeout_in_atomic(), whose
timeout argument is in milliseconds, not microseconds:
atomic_delay += HWSPINLOCK_RETRY_DELAY_US;
if (atomic_delay > to * 1000)
return -ETIMEDOUT;
So stm32mp_exti_set_type() asks for a 1 second timeout where the comment
next to the macro says it wants 1 millisecond. The semaphore is polled
with udelay() from a section that holds chip_data->rlock, a
raw_spinlock_t, so preemption stays disabled for the whole wait on every
configuration, PREEMPT_RT included.
The hwspinlock core documents this explicitly:
If the mode is HWLOCK_IN_ATOMIC (called from an atomic context) the
timeout is handled with busy-waiting delays, hence shall not exceed
few msecs.
Fixes: 5257169ade8c ("irqchip/stm32-exti: Use the hwspin_lock_timeout_in_atomic() API")
Signed-off-by: Ju Nan <junan76@163.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Radu Rendec <radu@rendec.net>
Reviewed-by: Antonio Borneo <antonio.borneo@foss.st.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260821024756.24927-2-junan76@163.com
Diffstat (limited to 'drivers/fpga/dfl-afu-dma-region.c')
0 files changed, 0 insertions, 0 deletions
