[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220211181500.1856198-3-bigeasy@linutronix.de>
Date: Fri, 11 Feb 2022 19:14:55 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: greybus-dev@...ts.linaro.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev,
linux-usb@...r.kernel.org, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Alex Elder <elder@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans de Goede <hdegoede@...hat.com>,
Jakub Kicinski <kuba@...nel.org>,
Johan Hovold <johan@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Rui Miguel Silva <rmfrfs@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
UNGLinuxDriver@...rochip.com, Wolfram Sang <wsa@...nel.org>,
Woojung Huh <woojung.huh@...rochip.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Michael Below <below@...iz.de>,
Salvatore Bonaccorso <carnil@...ian.org>,
Oleksandr Natalenko <oleksandr@...alenko.name>
Subject: [PATCH v4 2/7] 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@...iz.de>
Link: https://bugs.debian.org/1002537
Cc: Salvatore Bonaccorso <carnil@...ian.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Reviewed-by: Oleksandr Natalenko <oleksandr@...alenko.name>
Acked-by: Wolfram Sang <wsa@...nel.org>
---
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;
}
--
2.34.1
Powered by blists - more mailing lists