Re: [PATCH 2/7] i2c: core: Use generic_handle_irq_safe() in i2c_handle_smbus_host_notify().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On čtvrtek 27. ledna 2022 12:32:58 CET Sebastian Andrzej Siewior wrote:
> The i2c-i801 driver invokes i2c_handle_smbus_host_notify() from his
> interrupt service routine. On PREEMPT_RT i2c-i801's handler is forced
> threaded with enabled interrupts which leads to a warning by
> handle_irq_event_percpu() assuming that irq_default_primary_handler()
> enabled interrupts.
> 
> i2c-i801's interrupt handler can't be made non-threaded because the
> interrupt line is shared with other devices.
> 
> Use generic_handle_irq_safe() which can invoked with disabled and enabled
> interrupts.
> 
> Reported-by: Michael Below <below@xxxxxxxx>
> Link: https://bugs.debian.org/1002537
> Cc: Salvatore Bonaccorso <carnil@xxxxxxxxxx>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> ---
>  drivers/i2c/i2c-core-base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index 2c59dd748a49f..3f9e5303b6163 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -1424,7 +1424,7 @@ int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr)
>  	if (irq <= 0)
>  		return -ENXIO;
>  
> -	generic_handle_irq(irq);
> +	generic_handle_irq_safe(irq);
>  
>  	return 0;
>  }
> 

Reviewed-by: Oleksandr Natalenko <oleksandr@xxxxxxxxxxxxxx>

Worth linking [1] [2] and [3] as well maybe?

[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1873673
[2] https://bugzilla.kernel.org/show_bug.cgi?id=202453
[3] https://lore.kernel.org/lkml/20201204201930.vtvitsq6xcftjj3o@spock.localdomain/

-- 
Oleksandr Natalenko (post-factum)


_______________________________________________
greybus-dev mailing list -- greybus-dev@xxxxxxxxxxxxxxxx
To unsubscribe send an email to greybus-dev-leave@xxxxxxxxxxxxxxxx




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux