[PATCH] serial: stm32: Move hard IRQ handling to threaded interrupt context

Sebastian Andrzej Siewior bigeasy at linutronix.de
Wed Dec 7 23:52:23 PST 2022


- Jean Philippe Romain <jean-philippe.romain at foss.st.com>

Could you please drop that email address in future post as I did? It
comes back here with:
| Remote-MTA: dns; mxb-00178001.gslb.pphosted.com
| Diagnostic-Code: smtp; 550 5.1.1 User Unknown

On 2022-12-07 20:59:29 [+0100], Marek Vasut wrote:
> diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
> index a1490033aa164..f5bce0be02676 100644
> --- a/drivers/tty/serial/stm32-usart.c
> +++ b/drivers/tty/serial/stm32-usart.c
> @@ -1015,7 +1002,7 @@ static int stm32_usart_startup(struct uart_port *port)
>  	u32 val;
>  	int ret;
>  
> -	ret = request_threaded_irq(port->irq, stm32_usart_interrupt,
> +	ret = request_threaded_irq(port->irq, NULL,
>  				   stm32_usart_threaded_interrupt,
>  				   IRQF_ONESHOT | IRQF_NO_SUSPEND,
>  				   name, port);

So why don't you just
	request_irq(port->irq, stm32_usart_interrupt, IRQF_NO_SUSPEND,
		    name, port)
? If there is a requirement to always run in threaded mode please
document it by at least making it part of the commit description.

Sebastian



More information about the linux-arm-kernel mailing list