i2c: core: Use generic_handle_irq_safe() in i2c_handle_smbus_host_notify().

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@judiz.de>
Link: https://bugs.debian.org/1002537
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Sebastian Andrzej Siewior 2022-02-11 19:14:55 +01:00 committed by Wolfram Sang
parent 24e3bb7429
commit 68ea1b2c33
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}