]> git.baikalelectronics.ru Git - kernel.git/commit
serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler
authorMarek Vasut <marex@denx.de>
Thu, 12 Jan 2023 18:04:17 +0000 (19:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:33 +0000 (07:24 +0100)
commit8de3964bd9a89ff38da3461aee7f8d57576df064
tree79fc3f0b9a64a05c63553a8f2fe777439f90df2d
parenta11e83bd0dd8cea0a6ef97e63d7ee24ac3c56215
serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler

commit f24771b62a83239f0dce816bddf0f6807f436235 upstream.

Requesting an interrupt with IRQF_ONESHOT will run the primary handler
in the hard-IRQ context even in the force-threaded mode. The
force-threaded mode is used by PREEMPT_RT in order to avoid acquiring
sleeping locks (spinlock_t) in hard-IRQ context. This combination
makes it impossible and leads to "sleeping while atomic" warnings.

Use one interrupt handler for both handlers (primary and secondary)
and drop the IRQF_ONESHOT flag which is not needed.

Fixes: dec341f408463 ("serial: stm32: fix threaded interrupt handling")
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Valentin Caron <valentin.caron@foss.st.com> # V3
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230112180417.25595-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c