]> 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>
Fri, 20 Jan 2023 16:03:32 +0000 (17:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:23 +0000 (11:28 +0100)
commitf684469be6ec79aab28c55a76b3ebb6fe93387f1
treeb380c7863fde543bbab3a11cc6d9afb65529b47b
parentfae2c40a6e0832a52b78fd15227707f216acaa71
serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler

commit 3f6c02fa712bd453871877fe1d1969625617471e 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/20230120160332.57930-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c