* [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD [not found] <20260123113708.416727-1-bigeasy@linutronix.de> @ 2026-01-23 11:37 ` Sebastian Andrzej Siewior 2026-01-23 14:48 ` Andy Shevchenko ` (2 more replies) 2026-01-23 11:37 ` [PATCH 19/21] iio: Use IRQF_NO_THREAD Sebastian Andrzej Siewior 2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior 2 siblings, 3 replies; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-23 11:37 UTC (permalink / raw) To: linux-kernel Cc: linux-rt-devel, Thomas Gleixner, Sebastian Andrzej Siewior, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running. The flag also disallows force-threading of the primary handler and the irq-core will warn about this. The intention here was probably not allowing forced-threading for handlers such as iio_trigger_generic_data_rdy_poll() will intends to invoke hard-interrupt handlers. Replace IRQF_ONESHOT with IRQF_NO_THREAD. Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Puranjay Mohan <puranjay@kernel.org> Cc: Jonathan Cameron <jic23@kernel.org> Cc: David Lechner <dlechner@baylibre.com> Cc: "Nuno Sá" <nuno.sa@analog.com> Cc: Andy Shevchenko <andy@kernel.org> Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> Cc: Marcus Folkesson <marcus.folkesson@gmail.com> Cc: Kent Gustavsson <kent@minoris.se> Cc: Gustavo Silva <gustavograzs@gmail.com> Cc: Nishant Malpani <nish.malpani25@gmail.com> Cc: linux-iio@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/iio/accel/adxl355_core.c | 3 ++- drivers/iio/accel/adxl372.c | 9 ++++----- drivers/iio/accel/mxc4005.c | 11 ++++------- drivers/iio/accel/stk8ba50.c | 11 ++++------- drivers/iio/adc/ad4170-4.c | 2 +- drivers/iio/adc/ad7768-1.c | 5 ++--- drivers/iio/adc/ad7779.c | 2 +- drivers/iio/adc/mcp3911.c | 2 +- drivers/iio/adc/ti-ads131e08.c | 2 +- drivers/iio/chemical/ens160_core.c | 9 +++------ drivers/iio/gyro/adxrs290.c | 2 +- drivers/iio/health/afe4403.c | 9 ++++----- drivers/iio/health/afe4404.c | 9 ++++----- drivers/iio/magnetometer/bmc150_magn.c | 9 +++------ drivers/iio/pressure/dlhl60d.c | 6 +++--- drivers/iio/temperature/tmp006.c | 10 ++++------ 16 files changed, 42 insertions(+), 59 deletions(-) diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c index 5fc7f814b9077..04caa493176d3 100644 --- a/drivers/iio/accel/adxl355_core.c +++ b/drivers/iio/accel/adxl355_core.c @@ -770,7 +770,8 @@ static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq) ret = devm_request_irq(data->dev, irq, &iio_trigger_generic_data_rdy_poll, - IRQF_ONESHOT, "adxl355_irq", data->dready_trig); + IRQF_NO_THREAD, + "adxl355_irq", data->dready_trig); if (ret) return dev_err_probe(data->dev, ret, "request irq %d failed\n", irq); diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c index 46d518a2a0291..2f6aa52aeba51 100644 --- a/drivers/iio/accel/adxl372.c +++ b/drivers/iio/accel/adxl372.c @@ -1247,11 +1247,10 @@ int adxl372_probe(struct device *dev, struct regmap *regmap, indio_dev->trig = iio_trigger_get(st->dready_trig); - ret = devm_request_threaded_irq(dev, st->irq, - iio_trigger_generic_data_rdy_poll, - NULL, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, - indio_dev->name, st->dready_trig); + ret = devm_request_irq(dev, st->irq, + iio_trigger_generic_data_rdy_poll, + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, + indio_dev->name, st->dready_trig); if (ret < 0) return ret; } diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c index ac973d871c8bb..a2c3cf13d0981 100644 --- a/drivers/iio/accel/mxc4005.c +++ b/drivers/iio/accel/mxc4005.c @@ -486,13 +486,10 @@ static int mxc4005_probe(struct i2c_client *client) if (!data->dready_trig) return -ENOMEM; - ret = devm_request_threaded_irq(&client->dev, client->irq, - iio_trigger_generic_data_rdy_poll, - NULL, - IRQF_TRIGGER_FALLING | - IRQF_ONESHOT, - "mxc4005_event", - data->dready_trig); + ret = devm_request_irq(&client->dev, client->irq, + iio_trigger_generic_data_rdy_poll, + IRQF_TRIGGER_FALLING | IRQF_NO_THREAD, + "mxc4005_event", data->dready_trig); if (ret) { dev_err(&client->dev, "failed to init threaded irq\n"); diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c index 384f1fbcbcb37..a9ff2a273fe1c 100644 --- a/drivers/iio/accel/stk8ba50.c +++ b/drivers/iio/accel/stk8ba50.c @@ -428,13 +428,10 @@ static int stk8ba50_probe(struct i2c_client *client) } if (client->irq > 0) { - ret = devm_request_threaded_irq(&client->dev, client->irq, - stk8ba50_data_rdy_trig_poll, - NULL, - IRQF_TRIGGER_RISING | - IRQF_ONESHOT, - "stk8ba50_event", - indio_dev); + ret = devm_request_irq(&client->dev, client->irq, + stk8ba50_data_rdy_trig_poll, + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, + "stk8ba50_event", indio_dev); if (ret < 0) { dev_err(&client->dev, "request irq %d failed\n", client->irq); diff --git a/drivers/iio/adc/ad4170-4.c b/drivers/iio/adc/ad4170-4.c index efaed92191f1b..82205bfae531e 100644 --- a/drivers/iio/adc/ad4170-4.c +++ b/drivers/iio/adc/ad4170-4.c @@ -2973,7 +2973,7 @@ static int ad4170_probe(struct spi_device *spi) if (spi->irq) { ret = devm_request_irq(dev, spi->irq, &ad4170_irq_handler, - IRQF_ONESHOT, indio_dev->name, indio_dev); + IRQF_NO_THREAD, indio_dev->name, indio_dev); if (ret) return ret; diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index d96802b7847a6..84ce23c8e5782 100644 --- a/drivers/iio/adc/ad7768-1.c +++ b/drivers/iio/adc/ad7768-1.c @@ -1394,9 +1394,8 @@ static int ad7768_probe(struct spi_device *spi) if (ret) return ret; - ret = devm_request_irq(&spi->dev, spi->irq, - &ad7768_interrupt, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, + ret = devm_request_irq(&spi->dev, spi->irq, &ad7768_interrupt, + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, indio_dev->name, indio_dev); if (ret) return ret; diff --git a/drivers/iio/adc/ad7779.c b/drivers/iio/adc/ad7779.c index aac5049c9a07b..695cc79e78da5 100644 --- a/drivers/iio/adc/ad7779.c +++ b/drivers/iio/adc/ad7779.c @@ -840,7 +840,7 @@ static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev iio_trigger_set_drvdata(st->trig, st); ret = devm_request_irq(dev, st->spi->irq, iio_trigger_generic_data_rdy_poll, - IRQF_ONESHOT | IRQF_NO_AUTOEN, indio_dev->name, + IRQF_NO_THREAD | IRQF_NO_AUTOEN, indio_dev->name, st->trig); if (ret) return dev_err_probe(dev, ret, "request IRQ %d failed\n", diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c index a6f21791c6859..ddc3721f3f688 100644 --- a/drivers/iio/adc/mcp3911.c +++ b/drivers/iio/adc/mcp3911.c @@ -815,7 +815,7 @@ static int mcp3911_probe(struct spi_device *spi) * don't enable the interrupt to avoid extra load on the system. */ ret = devm_request_irq(dev, spi->irq, &iio_trigger_generic_data_rdy_poll, - IRQF_NO_AUTOEN | IRQF_ONESHOT, + IRQF_NO_AUTOEN | IRQF_NO_THREAD, indio_dev->name, adc->trig); if (ret) return ret; diff --git a/drivers/iio/adc/ti-ads131e08.c b/drivers/iio/adc/ti-ads131e08.c index c9a20024d6b11..a585621b0bc30 100644 --- a/drivers/iio/adc/ti-ads131e08.c +++ b/drivers/iio/adc/ti-ads131e08.c @@ -827,7 +827,7 @@ static int ads131e08_probe(struct spi_device *spi) if (spi->irq) { ret = devm_request_irq(&spi->dev, spi->irq, ads131e08_interrupt, - IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + IRQF_TRIGGER_FALLING | IRQF_NO_THREAD, spi->dev.driver->name, indio_dev); if (ret) return dev_err_probe(&spi->dev, ret, diff --git a/drivers/iio/chemical/ens160_core.c b/drivers/iio/chemical/ens160_core.c index 86bde4a91bf7e..bbc96c4c62838 100644 --- a/drivers/iio/chemical/ens160_core.c +++ b/drivers/iio/chemical/ens160_core.c @@ -316,12 +316,9 @@ static int ens160_setup_trigger(struct iio_dev *indio_dev, int irq) indio_dev->trig = iio_trigger_get(trig); - ret = devm_request_threaded_irq(dev, irq, - iio_trigger_generic_data_rdy_poll, - NULL, - IRQF_ONESHOT, - indio_dev->name, - indio_dev->trig); + ret = devm_request_irq(dev, irq, iio_trigger_generic_data_rdy_poll, + IRQF_NO_THREAD, indio_dev->name, + indio_dev->trig); if (ret) return dev_err_probe(dev, ret, "failed to request irq\n"); diff --git a/drivers/iio/gyro/adxrs290.c b/drivers/iio/gyro/adxrs290.c index 8fcb41f45baac..3efe385ebedc4 100644 --- a/drivers/iio/gyro/adxrs290.c +++ b/drivers/iio/gyro/adxrs290.c @@ -597,7 +597,7 @@ static int adxrs290_probe_trigger(struct iio_dev *indio_dev) ret = devm_request_irq(&st->spi->dev, st->spi->irq, &iio_trigger_generic_data_rdy_poll, - IRQF_ONESHOT, "adxrs290_irq", st->dready_trig); + IRQF_NO_THREAD, "adxrs290_irq", st->dready_trig); if (ret < 0) return dev_err_probe(&st->spi->dev, ret, "request irq %d failed\n", st->spi->irq); diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c index 0e5a512e3bb8f..d358f4d5e5da8 100644 --- a/drivers/iio/health/afe4403.c +++ b/drivers/iio/health/afe4403.c @@ -540,11 +540,10 @@ static int afe4403_probe(struct spi_device *spi) return ret; } - ret = devm_request_threaded_irq(dev, afe->irq, - iio_trigger_generic_data_rdy_poll, - NULL, IRQF_ONESHOT, - AFE4403_DRIVER_NAME, - afe->trig); + ret = devm_request_irq(dev, afe->irq, + iio_trigger_generic_data_rdy_poll, + IRQF_NO_THREAD, AFE4403_DRIVER_NAME, + afe->trig); if (ret) { dev_err(dev, "Unable to request IRQ\n"); return ret; diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c index 768d794e574b9..032da52a96d0e 100644 --- a/drivers/iio/health/afe4404.c +++ b/drivers/iio/health/afe4404.c @@ -547,11 +547,10 @@ static int afe4404_probe(struct i2c_client *client) return ret; } - ret = devm_request_threaded_irq(dev, afe->irq, - iio_trigger_generic_data_rdy_poll, - NULL, IRQF_ONESHOT, - AFE4404_DRIVER_NAME, - afe->trig); + ret = devm_request_irq(dev, afe->irq, + iio_trigger_generic_data_rdy_poll, + IRQF_NO_THREAD, AFE4404_DRIVER_NAME, + afe->trig); if (ret) { dev_err(dev, "Unable to request IRQ\n"); return ret; diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c index 6a73f6e2f1f06..a022e1805dff7 100644 --- a/drivers/iio/magnetometer/bmc150_magn.c +++ b/drivers/iio/magnetometer/bmc150_magn.c @@ -906,12 +906,9 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap, goto err_poweroff; } - ret = request_threaded_irq(irq, - iio_trigger_generic_data_rdy_poll, - NULL, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, - "bmc150_magn_event", - data->dready_trig); + ret = request_irq(irq, iio_trigger_generic_data_rdy_poll, + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, + "bmc150_magn_event", data->dready_trig); if (ret < 0) { dev_err(dev, "request irq %d failed\n", irq); goto err_trigger_unregister; diff --git a/drivers/iio/pressure/dlhl60d.c b/drivers/iio/pressure/dlhl60d.c index 8bad7162fec64..e975b733ce0a1 100644 --- a/drivers/iio/pressure/dlhl60d.c +++ b/drivers/iio/pressure/dlhl60d.c @@ -306,9 +306,9 @@ static int dlh_probe(struct i2c_client *client) indio_dev->num_channels = ARRAY_SIZE(dlh_channels); if (client->irq > 0) { - ret = devm_request_threaded_irq(&client->dev, client->irq, - dlh_interrupt, NULL, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, + ret = devm_request_irq(&client->dev, client->irq, + dlh_interrupt, + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, st->info->name, indio_dev); if (ret) { dev_err(&client->dev, "failed to allocate threaded irq"); diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c index 10bd3f221929d..d8d8c8936d177 100644 --- a/drivers/iio/temperature/tmp006.c +++ b/drivers/iio/temperature/tmp006.c @@ -356,12 +356,10 @@ static int tmp006_probe(struct i2c_client *client) indio_dev->trig = iio_trigger_get(data->drdy_trig); - ret = devm_request_threaded_irq(&client->dev, client->irq, - iio_trigger_generic_data_rdy_poll, - NULL, - IRQF_ONESHOT, - "tmp006_irq", - data->drdy_trig); + ret = devm_request_irq(&client->dev, client->irq, + iio_trigger_generic_data_rdy_poll, + IRQF_NO_THREAD, "tmp006_irq", + data->drdy_trig); if (ret < 0) return ret; } -- 2.51.0 ^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior @ 2026-01-23 14:48 ` Andy Shevchenko 2026-01-23 16:47 ` Jonathan Cameron 2026-01-26 8:15 ` Sebastian Andrzej Siewior 2026-01-26 10:53 ` Marcus Folkesson 2026-01-28 11:39 ` Nuno Sá 2 siblings, 2 replies; 29+ messages in thread From: Andy Shevchenko @ 2026-01-23 14:48 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Fri, Jan 23, 2026 at 12:37:04PM +0100, Sebastian Andrzej Siewior wrote: > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > the secondary (threaded) handler is done. If only a primary handler is > used then the flag makes no sense because the interrupt can not fire > (again) while its handler is running. > The flag also disallows force-threading of the primary handler and the > irq-core will warn about this. > > The intention here was probably not allowing forced-threading for > handlers such as iio_trigger_generic_data_rdy_poll() will intends to > invoke hard-interrupt handlers. > > Replace IRQF_ONESHOT with IRQF_NO_THREAD. Code wise LGTM, Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> There is a few nit-picks regarding style below. ... > Cc: Lars-Peter Clausen <lars@metafoo.de> > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > Cc: Puranjay Mohan <puranjay@kernel.org> > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > Cc: Kent Gustavsson <kent@minoris.se> > Cc: Gustavo Silva <gustavograzs@gmail.com> > Cc: Nishant Malpani <nish.malpani25@gmail.com> > Cc: linux-iio@vger.kernel.org Move these... > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- ...to be here. This will drastically reduce the unneeded noise in the commit message. The email will have (if using git format-patch and git send-email) them. ... > --- a/drivers/iio/accel/adxl355_core.c > +++ b/drivers/iio/accel/adxl355_core.c > @@ -770,7 +770,8 @@ static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq) > > ret = devm_request_irq(data->dev, irq, > &iio_trigger_generic_data_rdy_poll, > - IRQF_ONESHOT, "adxl355_irq", data->dready_trig); > + IRQF_NO_THREAD, > + "adxl355_irq", data->dready_trig); Leave it on a single line. It's only 81 characters and it's fine to be like this. > if (ret) > return dev_err_probe(data->dev, ret, "request irq %d failed\n", > irq); ... > +++ b/drivers/iio/accel/adxl372.c > + ret = devm_request_irq(dev, st->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > + indio_dev->name, st->dready_trig); > if (ret < 0) > return ret; Interestingly that this driver ignores the flags from firmware... Seems to me like a bug (not in your patch, obviously). Ditto for other drivers doing similar things. ... > --- a/drivers/iio/pressure/dlhl60d.c > +++ b/drivers/iio/pressure/dlhl60d.c > @@ -306,9 +306,9 @@ static int dlh_probe(struct i2c_client *client) > indio_dev->num_channels = ARRAY_SIZE(dlh_channels); > > if (client->irq > 0) { > - ret = devm_request_threaded_irq(&client->dev, client->irq, > - dlh_interrupt, NULL, > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > + ret = devm_request_irq(&client->dev, client->irq, > + dlh_interrupt, Joined to the previous line it gives exactly 80 characters, which is allowed. > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > st->info->name, indio_dev); Forgot to indent. ... > + ret = devm_request_irq(&client->dev, client->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_NO_THREAD, "tmp006_irq", > + data->drdy_trig); > if (ret < 0) > return ret; Jonathan et al., this seems to me like a duplication from one to another driver. Can't we do like a helper for it, so we don't change it each time the IRQ core or other things got changed? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-23 14:48 ` Andy Shevchenko @ 2026-01-23 16:47 ` Jonathan Cameron 2026-01-23 21:00 ` David Lechner 2026-01-26 8:15 ` Sebastian Andrzej Siewior 1 sibling, 1 reply; 29+ messages in thread From: Jonathan Cameron @ 2026-01-23 16:47 UTC (permalink / raw) To: Andy Shevchenko Cc: Sebastian Andrzej Siewior, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio > > +++ b/drivers/iio/accel/adxl372.c > > > + ret = devm_request_irq(dev, st->irq, > > + iio_trigger_generic_data_rdy_poll, > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > + indio_dev->name, st->dready_trig); > > if (ret < 0) > > return ret; > > Interestingly that this driver ignores the flags from firmware... Seems to me > like a bug (not in your patch, obviously). Ditto for other drivers doing similar > things. > It's indeed a bug but one of those historic ones we can't fix without high risk of regressions :( > ... > > > --- a/drivers/iio/pressure/dlhl60d.c > > +++ b/drivers/iio/pressure/dlhl60d.c > > @@ -306,9 +306,9 @@ static int dlh_probe(struct i2c_client *client) > > indio_dev->num_channels = ARRAY_SIZE(dlh_channels); > > > > if (client->irq > 0) { > > - ret = devm_request_threaded_irq(&client->dev, client->irq, > > - dlh_interrupt, NULL, > > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > > + ret = devm_request_irq(&client->dev, client->irq, > > + dlh_interrupt, > > Joined to the previous line it gives exactly 80 characters, which is allowed. > > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > st->info->name, indio_dev); > > Forgot to indent. > > ... > > > + ret = devm_request_irq(&client->dev, client->irq, > > + iio_trigger_generic_data_rdy_poll, > > + IRQF_NO_THREAD, "tmp006_irq", > > + data->drdy_trig); > > if (ret < 0) > > return ret; > > Jonathan et al., this seems to me like a duplication from one to another > driver. Can't we do like a helper for it, so we don't change it each time > the IRQ core or other things got changed? I'm not sure what the helper would include that would shorten things much: could hide two params, but need a longer name and that's going to be hard to find. So maybe... J > ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-23 16:47 ` Jonathan Cameron @ 2026-01-23 21:00 ` David Lechner 0 siblings, 0 replies; 29+ messages in thread From: David Lechner @ 2026-01-23 21:00 UTC (permalink / raw) To: Jonathan Cameron, Andy Shevchenko Cc: Sebastian Andrzej Siewior, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On 1/23/26 10:47 AM, Jonathan Cameron wrote: > >>> +++ b/drivers/iio/accel/adxl372.c >> >>> + ret = devm_request_irq(dev, st->irq, >>> + iio_trigger_generic_data_rdy_poll, >>> + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, >>> + indio_dev->name, st->dready_trig); >>> if (ret < 0) >>> return ret; >> >> Interestingly that this driver ignores the flags from firmware... Seems to me >> like a bug (not in your patch, obviously). Ditto for other drivers doing similar >> things. >> > > It's indeed a bug but one of those historic ones we can't fix without > high risk of regressions :( > > Sounds like we should add a "don't copy this because ..." comment while we are touching this. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-23 14:48 ` Andy Shevchenko 2026-01-23 16:47 ` Jonathan Cameron @ 2026-01-26 8:15 ` Sebastian Andrzej Siewior 2026-01-26 9:51 ` Andy Shevchenko 1 sibling, 1 reply; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-26 8:15 UTC (permalink / raw) To: Andy Shevchenko Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On 2026-01-23 16:48:54 [+0200], Andy Shevchenko wrote: > On Fri, Jan 23, 2026 at 12:37:04PM +0100, Sebastian Andrzej Siewior wrote: > > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > > the secondary (threaded) handler is done. If only a primary handler is > > used then the flag makes no sense because the interrupt can not fire > > (again) while its handler is running. > > The flag also disallows force-threading of the primary handler and the > > irq-core will warn about this. > > > > The intention here was probably not allowing forced-threading for > > handlers such as iio_trigger_generic_data_rdy_poll() will intends to > > invoke hard-interrupt handlers. > > > > Replace IRQF_ONESHOT with IRQF_NO_THREAD. > > Code wise LGTM, > Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> > > There is a few nit-picks regarding style below. > > ... > > > Cc: Lars-Peter Clausen <lars@metafoo.de> > > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > > Cc: Puranjay Mohan <puranjay@kernel.org> > > Cc: Jonathan Cameron <jic23@kernel.org> > > Cc: David Lechner <dlechner@baylibre.com> > > Cc: "Nuno Sá" <nuno.sa@analog.com> > > Cc: Andy Shevchenko <andy@kernel.org> > > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > > Cc: Kent Gustavsson <kent@minoris.se> > > Cc: Gustavo Silva <gustavograzs@gmail.com> > > Cc: Nishant Malpani <nish.malpani25@gmail.com> > > Cc: linux-iio@vger.kernel.org > > Move these... > > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > > --- > > ...to be here. This will drastically reduce the unneeded noise in the commit > message. The email will have (if using git format-patch and git send-email) > them. Yeah but if I have to send v2 then they are gone, aren't they? So I have to move them for each submission. Or is there something I am not aware of? > ... > > > --- a/drivers/iio/accel/adxl355_core.c > > +++ b/drivers/iio/accel/adxl355_core.c > > @@ -770,7 +770,8 @@ static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq) > > > > ret = devm_request_irq(data->dev, irq, > > &iio_trigger_generic_data_rdy_poll, > > - IRQF_ONESHOT, "adxl355_irq", data->dready_trig); > > + IRQF_NO_THREAD, > > + "adxl355_irq", data->dready_trig); > > Leave it on a single line. It's only 81 characters and it's fine to be like > this. > > > if (ret) > > return dev_err_probe(data->dev, ret, "request irq %d failed\n", > > irq); > > ... > > > +++ b/drivers/iio/accel/adxl372.c > > > + ret = devm_request_irq(dev, st->irq, > > + iio_trigger_generic_data_rdy_poll, > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > + indio_dev->name, st->dready_trig); > > if (ret < 0) > > return ret; > > Interestingly that this driver ignores the flags from firmware... Seems to me > like a bug (not in your patch, obviously). Ditto for other drivers doing similar > things. If the irq-chip is level or unknown mode on boot up/ default and the device can only operate as an edge-rising then I don't see why this should be a bug. > ... > > > --- a/drivers/iio/pressure/dlhl60d.c > > +++ b/drivers/iio/pressure/dlhl60d.c > > @@ -306,9 +306,9 @@ static int dlh_probe(struct i2c_client *client) > > indio_dev->num_channels = ARRAY_SIZE(dlh_channels); > > > > if (client->irq > 0) { > > - ret = devm_request_threaded_irq(&client->dev, client->irq, > > - dlh_interrupt, NULL, > > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > > + ret = devm_request_irq(&client->dev, client->irq, > > + dlh_interrupt, > > Joined to the previous line it gives exactly 80 characters, which is allowed. > > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > st->info->name, indio_dev); > > Forgot to indent. Okay, let me fix this up. > > ... > > > + ret = devm_request_irq(&client->dev, client->irq, > > + iio_trigger_generic_data_rdy_poll, > > + IRQF_NO_THREAD, "tmp006_irq", > > + data->drdy_trig); > > if (ret < 0) > > return ret; > > Jonathan et al., this seems to me like a duplication from one to another > driver. Can't we do like a helper for it, so we don't change it each time > the IRQ core or other things got changed? > Sebastian ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 8:15 ` Sebastian Andrzej Siewior @ 2026-01-26 9:51 ` Andy Shevchenko 2026-01-26 10:10 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 29+ messages in thread From: Andy Shevchenko @ 2026-01-26 9:51 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, Jan 26, 2026 at 09:15:10AM +0100, Sebastian Andrzej Siewior wrote: > On 2026-01-23 16:48:54 [+0200], Andy Shevchenko wrote: > > On Fri, Jan 23, 2026 at 12:37:04PM +0100, Sebastian Andrzej Siewior wrote: ... > > > Cc: Lars-Peter Clausen <lars@metafoo.de> > > > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > > > Cc: Puranjay Mohan <puranjay@kernel.org> > > > Cc: Jonathan Cameron <jic23@kernel.org> > > > Cc: David Lechner <dlechner@baylibre.com> > > > Cc: "Nuno Sá" <nuno.sa@analog.com> > > > Cc: Andy Shevchenko <andy@kernel.org> > > > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > > > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > > > Cc: Kent Gustavsson <kent@minoris.se> > > > Cc: Gustavo Silva <gustavograzs@gmail.com> > > > Cc: Nishant Malpani <nish.malpani25@gmail.com> > > > Cc: linux-iio@vger.kernel.org > > > > Move these... > > > > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > > > --- > > > > ...to be here. This will drastically reduce the unneeded noise in the commit > > message. The email will have (if using git format-patch and git send-email) > > them. > > Yeah but if I have to send v2 then they are gone, aren't they? I didn't follow. How? What tools do you use? > So I have to move them for each submission. Or is there something I am not > aware of? Make them in the tail of commit messages locally with a delimiter, they will always be present as long as they are in your tree. I dunno if `b4` manages the Cc lists separately. At least I see no-one using `b4` *and* putting the Cc noise into the commit messages, so I assume it behaves nicely. ... > > > + ret = devm_request_irq(dev, st->irq, > > > + iio_trigger_generic_data_rdy_poll, > > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > > + indio_dev->name, st->dready_trig); > > > if (ret < 0) > > > return ret; > > > > Interestingly that this driver ignores the flags from firmware... Seems to me > > like a bug (not in your patch, obviously). Ditto for other drivers doing similar > > things. > > If the irq-chip is level or unknown mode on boot up/ default and the > device can only operate as an edge-rising then I don't see why this > should be a bug. But if FW says use "level", wouldn't this setting override it? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 9:51 ` Andy Shevchenko @ 2026-01-26 10:10 ` Sebastian Andrzej Siewior 2026-01-26 11:01 ` Andy Shevchenko 0 siblings, 1 reply; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-26 10:10 UTC (permalink / raw) To: Andy Shevchenko Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On 2026-01-26 11:51:13 [+0200], Andy Shevchenko wrote: > > > > Cc: Lars-Peter Clausen <lars@metafoo.de> > > > > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > > > > Cc: Puranjay Mohan <puranjay@kernel.org> > > > > Cc: Jonathan Cameron <jic23@kernel.org> > > > > Cc: David Lechner <dlechner@baylibre.com> > > > > Cc: "Nuno Sá" <nuno.sa@analog.com> > > > > Cc: Andy Shevchenko <andy@kernel.org> > > > > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > > > > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > > > > Cc: Kent Gustavsson <kent@minoris.se> > > > > Cc: Gustavo Silva <gustavograzs@gmail.com> > > > > Cc: Nishant Malpani <nish.malpani25@gmail.com> > > > > Cc: linux-iio@vger.kernel.org > > > … > I didn't follow. How? What tools do you use? b4/ git. > > So I have to move them for each submission. Or is there something I am not > > aware of? > > Make them in the tail of commit messages locally with a delimiter, they will > always be present as long as they are in your tree. > > I dunno if `b4` manages the Cc lists separately. At least I see no-one using > `b4` *and* putting the Cc noise into the commit messages, so I assume it > behaves nicely. I point is if I move them for one submission, I lose it on the next if I update patches in tree and re-export them. > > > > + ret = devm_request_irq(dev, st->irq, > > > > + iio_trigger_generic_data_rdy_poll, > > > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > > > + indio_dev->name, st->dready_trig); > > > > if (ret < 0) > > > > return ret; > > > > > > Interestingly that this driver ignores the flags from firmware... Seems to me > > > like a bug (not in your patch, obviously). Ditto for other drivers doing similar > > > things. > > > > If the irq-chip is level or unknown mode on boot up/ default and the > > device can only operate as an edge-rising then I don't see why this > > should be a bug. > > But if FW says use "level", wouldn't this setting override it? Yes, it will. It was common to use it pre-device-tree time where this information was not configured automatically before ->probe. Now it might be missing/wrong in the dt for some of the old devices. It might be a left-over which continued to grow and spread. Sebastian ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 10:10 ` Sebastian Andrzej Siewior @ 2026-01-26 11:01 ` Andy Shevchenko 2026-01-26 14:29 ` Konstantin Ryabitsev 2026-01-28 10:07 ` Sebastian Andrzej Siewior 0 siblings, 2 replies; 29+ messages in thread From: Andy Shevchenko @ 2026-01-26 11:01 UTC (permalink / raw) To: Sebastian Andrzej Siewior, tools Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, Jan 26, 2026 at 11:10:34AM +0100, Sebastian Andrzej Siewior wrote: > On 2026-01-26 11:51:13 [+0200], Andy Shevchenko wrote: > > > > > Cc: Lars-Peter Clausen <lars@metafoo.de> > > > > > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > > > > > Cc: Puranjay Mohan <puranjay@kernel.org> > > > > > Cc: Jonathan Cameron <jic23@kernel.org> > > > > > Cc: David Lechner <dlechner@baylibre.com> > > > > > Cc: "Nuno Sá" <nuno.sa@analog.com> > > > > > Cc: Andy Shevchenko <andy@kernel.org> > > > > > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > > > > > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > > > > > Cc: Kent Gustavsson <kent@minoris.se> > > > > > Cc: Gustavo Silva <gustavograzs@gmail.com> > > > > > Cc: Nishant Malpani <nish.malpani25@gmail.com> > > > > > Cc: linux-iio@vger.kernel.org > > > > > … > > I didn't follow. How? What tools do you use? > > b4/ git. > > > So I have to move them for each submission. Or is there something I am not > > > aware of? > > > > Make them in the tail of commit messages locally with a delimiter, they will > > always be present as long as they are in your tree. > > > > I dunno if `b4` manages the Cc lists separately. At least I see no-one using > > `b4` *and* putting the Cc noise into the commit messages, so I assume it > > behaves nicely. > > I point is if I move them for one submission, It will be in your Git tree as a part of the commit message. What I mean is that your commit message will be like $PREFIX: $SUMMARY ...blank line... $COMMIT_MESSAGE ...blank line... $TAG Signed-off-by: ... --- Cc: person 1 Cc: person 2 Just don't reimport them via `git am`. > I lose it on the next if I update patches in tree and re-export them. I don't understand this, sorry. Can you provide a step-by-step example? Do you mean that you are taking previous version from the list and reapplying it via `git am`? But shouldn't `b4` take care of that as long as it knows the Change-ID and it matches? ... Hmm... The https://b4.docs.kernel.org/en/latest/contributor/prep.html doesn't clearly tell me if there is a carry-on procedure for the Cc list between versions. ... > > > > > + ret = devm_request_irq(dev, st->irq, > > > > > + iio_trigger_generic_data_rdy_poll, > > > > > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > > > > > + indio_dev->name, st->dready_trig); > > > > > if (ret < 0) > > > > > return ret; > > > > > > > > Interestingly that this driver ignores the flags from firmware... Seems to me > > > > like a bug (not in your patch, obviously). Ditto for other drivers doing similar > > > > things. > > > > > > If the irq-chip is level or unknown mode on boot up/ default and the > > > device can only operate as an edge-rising then I don't see why this > > > should be a bug. > > > > But if FW says use "level", wouldn't this setting override it? > > Yes, it will. It was common to use it pre-device-tree time where this > information was not configured automatically before ->probe. Now it > might be missing/wrong in the dt for some of the old devices. > It might be a left-over which continued to grow and spread. It may be considered as a bug, especially in the cases when the driver works only on DT/ACPI platforms. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 11:01 ` Andy Shevchenko @ 2026-01-26 14:29 ` Konstantin Ryabitsev 2026-01-26 14:57 ` Andy Shevchenko 2026-01-28 10:45 ` Nuno Sá 2026-01-28 10:07 ` Sebastian Andrzej Siewior 1 sibling, 2 replies; 29+ messages in thread From: Konstantin Ryabitsev @ 2026-01-26 14:29 UTC (permalink / raw) To: Andy Shevchenko Cc: Sebastian Andrzej Siewior, tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, Jan 26, 2026 at 01:01:02PM +0200, Andy Shevchenko wrote: > > I lose it on the next if I update patches in tree and re-export them. > > I don't understand this, sorry. Can you provide a step-by-step example? > Do you mean that you are taking previous version from the list and reapplying > it via `git am`? But shouldn't `b4` take care of that as long as it knows the > Change-ID and it matches? That's not the intended workflow -- the series is kept as a branch in your local tree and any updates happen to that branch, so any entries in a commit falling under "---" will persist across revisions. > Hmm... The https://b4.docs.kernel.org/en/latest/contributor/prep.html > doesn't clearly tell me if there is a carry-on procedure for the Cc > list between versions. There isn't any special procedure. ¯\_(ツ)_/¯ -K ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 14:29 ` Konstantin Ryabitsev @ 2026-01-26 14:57 ` Andy Shevchenko 2026-01-26 15:09 ` Konstantin Ryabitsev 2026-01-28 10:45 ` Nuno Sá 1 sibling, 1 reply; 29+ messages in thread From: Andy Shevchenko @ 2026-01-26 14:57 UTC (permalink / raw) To: Konstantin Ryabitsev Cc: Sebastian Andrzej Siewior, tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, Jan 26, 2026 at 09:29:45AM -0500, Konstantin Ryabitsev wrote: > On Mon, Jan 26, 2026 at 01:01:02PM +0200, Andy Shevchenko wrote: > > > I lose it on the next if I update patches in tree and re-export them. > > > > I don't understand this, sorry. Can you provide a step-by-step example? > > Do you mean that you are taking previous version from the list and reapplying > > it via `git am`? But shouldn't `b4` take care of that as long as it knows the > > Change-ID and it matches? > > That's not the intended workflow -- the series is kept as a branch in your > local tree and any updates happen to that branch, so any entries in a commit > falling under "---" will persist across revisions. Right. I found `b4 trailers` do a really good job to inject collected trailers into the Git repo without need of any `git reset; b4 am; git am` dances. > > Hmm... The https://b4.docs.kernel.org/en/latest/contributor/prep.html > > doesn't clearly tell me if there is a carry-on procedure for the Cc > > list between versions. > > There isn't any special procedure. ¯\_(ツ)_/¯ What I have i mind is rather the scenario when I see already sent (by somebody else) patch in the mailing list and I want develop a followup with the same To/Cc list. So I want `b4 ... --use/restore-to-cc-from-the-mailing-list / lore` type of functionality. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 14:57 ` Andy Shevchenko @ 2026-01-26 15:09 ` Konstantin Ryabitsev 2026-01-26 15:16 ` Andy Shevchenko 0 siblings, 1 reply; 29+ messages in thread From: Konstantin Ryabitsev @ 2026-01-26 15:09 UTC (permalink / raw) To: Andy Shevchenko Cc: Sebastian Andrzej Siewior, tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, Jan 26, 2026 at 04:57:24PM +0200, Andy Shevchenko wrote: > What I have i mind is rather the scenario when I see already sent (by somebody > else) patch in the mailing list and I want develop a followup with the same > To/Cc list. So I want `b4 ... --use/restore-to-cc-from-the-mailing-list / lore` > type of functionality. To understand it better -- you want to send a new revision to a patch sent by someone else? If so, you should be able to "b4 prep --from-thread <msgid>", but it's actually a good question if that will do the right thing with content under "---" or not, as I'm not sure this part was ever properly tested. -K ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 15:09 ` Konstantin Ryabitsev @ 2026-01-26 15:16 ` Andy Shevchenko 0 siblings, 0 replies; 29+ messages in thread From: Andy Shevchenko @ 2026-01-26 15:16 UTC (permalink / raw) To: Konstantin Ryabitsev Cc: Sebastian Andrzej Siewior, tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, Jan 26, 2026 at 10:09:25AM -0500, Konstantin Ryabitsev wrote: > On Mon, Jan 26, 2026 at 04:57:24PM +0200, Andy Shevchenko wrote: > > What I have i mind is rather the scenario when I see already sent (by somebody > > else) patch in the mailing list and I want develop a followup with the same > > To/Cc list. So I want `b4 ... --use/restore-to-cc-from-the-mailing-list / lore` > > type of functionality. > To understand it better -- you want to send a new revision to a patch sent by > someone else? Like this or when I want to send another patch on top of what has been sent to the same people. > If so, you should be able to "b4 prep --from-thread <msgid>", > but it's actually a good question if that will do the right thing with content > under "---" or not, as I'm not sure this part was ever properly tested. But that's not needed, as it's assumed to be in the *email* Cc and To already, so that's it then. I will try the suggested command, thanks! More complex case is to preserve that locally, but it might be not needed after all. Thanks for the suggestions and nice tool! -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 14:29 ` Konstantin Ryabitsev 2026-01-26 14:57 ` Andy Shevchenko @ 2026-01-28 10:45 ` Nuno Sá 2026-01-28 13:53 ` Konstantin Ryabitsev 1 sibling, 1 reply; 29+ messages in thread From: Nuno Sá @ 2026-01-28 10:45 UTC (permalink / raw) To: Konstantin Ryabitsev, Andy Shevchenko Cc: Sebastian Andrzej Siewior, tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Mon, 2026-01-26 at 09:29 -0500, Konstantin Ryabitsev wrote: > On Mon, Jan 26, 2026 at 01:01:02PM +0200, Andy Shevchenko wrote: > > > I lose it on the next if I update patches in tree and re-export them. > > > > I don't understand this, sorry. Can you provide a step-by-step example? > > Do you mean that you are taking previous version from the list and reapplying > > it via `git am`? But shouldn't `b4` take care of that as long as it knows the > > Change-ID and it matches? > > That's not the intended workflow -- the series is kept as a branch in your > local tree and any updates happen to that branch, so any entries in a commit > falling under "---" will persist across revisions. > Hi Konstantin, Since I have you here, I might ask about something that I'm not sure how to handle. Might be dumb but here it goes. One problem is when I send v1 based on a branch and when I'm starting to work on v2 that branch was force-updated and I want to base my v2 on it. Is there any good way to handle this? What I currently do is more or less: git cat-file -p $COVER_SHA git reset --hard origin/branch git commit --allow-empty (and past all the cover with b4 metadata) // apply my series patches. Thx! - Nuno Sá > ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-28 10:45 ` Nuno Sá @ 2026-01-28 13:53 ` Konstantin Ryabitsev 0 siblings, 0 replies; 29+ messages in thread From: Konstantin Ryabitsev @ 2026-01-28 13:53 UTC (permalink / raw) To: Nuno Sá, Andy Shevchenko Cc: Sebastian Andrzej Siewior, tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Wed, Jan 28, 2026, at 05:45, Nuno Sá wrote: > Since I have you here, I might ask about something that I'm not sure > how to handle. Might be dumb but here it goes. One problem is when I > send v1 based on a branch and when I'm starting to work on v2 that > branch was force-updated and I want to base my v2 on it. Is there any > good way to handle this? You should be able to just rebase the b4 branch. git switch b4/your-branch git rebase tracking-branch You can do this at any point, not necessarily between revisions. Since we have the tracking empty commit, we'll always know the base-commit automatically. -K ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-26 11:01 ` Andy Shevchenko 2026-01-26 14:29 ` Konstantin Ryabitsev @ 2026-01-28 10:07 ` Sebastian Andrzej Siewior 2026-01-28 10:15 ` Andy Shevchenko 1 sibling, 1 reply; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-28 10:07 UTC (permalink / raw) To: Andy Shevchenko Cc: tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On 2026-01-26 13:01:02 [+0200], Andy Shevchenko wrote: > --- > Cc: person 1 > Cc: person 2 > > Just don't reimport them via `git am`. > > > I lose it on the next if I update patches in tree and re-export them. > > I don't understand this, sorry. Can you provide a step-by-step example? > Do you mean that you are taking previous version from the list and reapplying > it via `git am`? But shouldn't `b4` take care of that as long as it knows the > Change-ID and it matches? So doing this and switching to b4 trailers to grab the tags actually help. Then I have been playing with prep. So thank you. Then I stumbled upon --auto-to-cc which picked up all addresses and added it to the cover letter which was fine. But then `send' used those for every patch in the series which I did not want. So for that part I probably stick with git-send-mail since this not in everyone's workflow (sending a series across multiple subsystems and avoiding flooding everyone). Anyway. This seems to have turned out nice. Sebastian ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-28 10:07 ` Sebastian Andrzej Siewior @ 2026-01-28 10:15 ` Andy Shevchenko 0 siblings, 0 replies; 29+ messages in thread From: Andy Shevchenko @ 2026-01-28 10:15 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: tools, linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Wed, Jan 28, 2026 at 11:07:36AM +0100, Sebastian Andrzej Siewior wrote: > On 2026-01-26 13:01:02 [+0200], Andy Shevchenko wrote: > > --- > > Cc: person 1 > > Cc: person 2 > > > > Just don't reimport them via `git am`. > > > > > I lose it on the next if I update patches in tree and re-export them. > > > > I don't understand this, sorry. Can you provide a step-by-step example? > > Do you mean that you are taking previous version from the list and reapplying > > it via `git am`? But shouldn't `b4` take care of that as long as it knows the > > Change-ID and it matches? > > So doing this and switching to b4 trailers to grab the tags actually > help. Then I have been playing with prep. So thank you. You're welcome! > Then I stumbled upon --auto-to-cc which picked up all addresses and > added it to the cover letter which was fine. But then `send' used those > for every patch in the series which I did not want. So for that part I > probably stick with git-send-mail since this not in everyone's workflow > (sending a series across multiple subsystems and avoiding flooding > everyone). I'm not an (advanced) user of `b4` yet. I have my own script to send based on some heuristics [1]. > Anyway. This seems to have turned out nice. Good! [1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior 2026-01-23 14:48 ` Andy Shevchenko @ 2026-01-26 10:53 ` Marcus Folkesson 2026-01-28 11:39 ` Nuno Sá 2 siblings, 0 replies; 29+ messages in thread From: Marcus Folkesson @ 2026-01-26 10:53 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio [-- Attachment #1: Type: text/plain, Size: 1498 bytes --] On Fri, Jan 23, 2026 at 12:37:04PM +0100, Sebastian Andrzej Siewior wrote: > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > the secondary (threaded) handler is done. If only a primary handler is > used then the flag makes no sense because the interrupt can not fire > (again) while its handler is running. > The flag also disallows force-threading of the primary handler and the > irq-core will warn about this. > > The intention here was probably not allowing forced-threading for > handlers such as iio_trigger_generic_data_rdy_poll() will intends to > invoke hard-interrupt handlers. > > Replace IRQF_ONESHOT with IRQF_NO_THREAD. > > Cc: Lars-Peter Clausen <lars@metafoo.de> > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > Cc: Puranjay Mohan <puranjay@kernel.org> > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > Cc: Kent Gustavsson <kent@minoris.se> > Cc: Gustavo Silva <gustavograzs@gmail.com> > Cc: Nishant Malpani <nish.malpani25@gmail.com> > Cc: linux-iio@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- [...] > drivers/iio/adc/mcp3911.c | 2 +- Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Best regards, Marcus Folkesson [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior 2026-01-23 14:48 ` Andy Shevchenko 2026-01-26 10:53 ` Marcus Folkesson @ 2026-01-28 11:39 ` Nuno Sá 2 siblings, 0 replies; 29+ messages in thread From: Nuno Sá @ 2026-01-28 11:39 UTC (permalink / raw) To: Sebastian Andrzej Siewior, linux-kernel Cc: linux-rt-devel, Thomas Gleixner, Lars-Peter Clausen, Michael Hennerich, Puranjay Mohan, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson, Gustavo Silva, Nishant Malpani, linux-iio On Fri, 2026-01-23 at 12:37 +0100, Sebastian Andrzej Siewior wrote: > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > the secondary (threaded) handler is done. If only a primary handler is > used then the flag makes no sense because the interrupt can not fire > (again) while its handler is running. > The flag also disallows force-threading of the primary handler and the > irq-core will warn about this. > > The intention here was probably not allowing forced-threading for > handlers such as iio_trigger_generic_data_rdy_poll() will intends to > invoke hard-interrupt handlers. > > Replace IRQF_ONESHOT with IRQF_NO_THREAD. > > Cc: Lars-Peter Clausen <lars@metafoo.de> > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > Cc: Puranjay Mohan <puranjay@kernel.org> > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: Marcelo Schmitt <marcelo.schmitt@analog.com> > Cc: Marcus Folkesson <marcus.folkesson@gmail.com> > Cc: Kent Gustavsson <kent@minoris.se> > Cc: Gustavo Silva <gustavograzs@gmail.com> > Cc: Nishant Malpani <nish.malpani25@gmail.com> > Cc: linux-iio@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- LGTM, Reviewed-by: Nuno Sá <nuno.sa@analog.com> > drivers/iio/accel/adxl355_core.c | 3 ++- > drivers/iio/accel/adxl372.c | 9 ++++----- > drivers/iio/accel/mxc4005.c | 11 ++++------- > drivers/iio/accel/stk8ba50.c | 11 ++++------- > drivers/iio/adc/ad4170-4.c | 2 +- > drivers/iio/adc/ad7768-1.c | 5 ++--- > drivers/iio/adc/ad7779.c | 2 +- > drivers/iio/adc/mcp3911.c | 2 +- > drivers/iio/adc/ti-ads131e08.c | 2 +- > drivers/iio/chemical/ens160_core.c | 9 +++------ > drivers/iio/gyro/adxrs290.c | 2 +- > drivers/iio/health/afe4403.c | 9 ++++----- > drivers/iio/health/afe4404.c | 9 ++++----- > drivers/iio/magnetometer/bmc150_magn.c | 9 +++------ > drivers/iio/pressure/dlhl60d.c | 6 +++--- > drivers/iio/temperature/tmp006.c | 10 ++++------ > 16 files changed, 42 insertions(+), 59 deletions(-) > > diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c > index 5fc7f814b9077..04caa493176d3 100644 > --- a/drivers/iio/accel/adxl355_core.c > +++ b/drivers/iio/accel/adxl355_core.c > @@ -770,7 +770,8 @@ static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq) > > ret = devm_request_irq(data->dev, irq, > &iio_trigger_generic_data_rdy_poll, > - IRQF_ONESHOT, "adxl355_irq", data->dready_trig); > + IRQF_NO_THREAD, > + "adxl355_irq", data->dready_trig); > if (ret) > return dev_err_probe(data->dev, ret, "request irq %d failed\n", > irq); > diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c > index 46d518a2a0291..2f6aa52aeba51 100644 > --- a/drivers/iio/accel/adxl372.c > +++ b/drivers/iio/accel/adxl372.c > @@ -1247,11 +1247,10 @@ int adxl372_probe(struct device *dev, struct regmap *regmap, > > indio_dev->trig = iio_trigger_get(st->dready_trig); > > - ret = devm_request_threaded_irq(dev, st->irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > - indio_dev->name, st->dready_trig); > + ret = devm_request_irq(dev, st->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > + indio_dev->name, st->dready_trig); > if (ret < 0) > return ret; > } > diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c > index ac973d871c8bb..a2c3cf13d0981 100644 > --- a/drivers/iio/accel/mxc4005.c > +++ b/drivers/iio/accel/mxc4005.c > @@ -486,13 +486,10 @@ static int mxc4005_probe(struct i2c_client *client) > if (!data->dready_trig) > return -ENOMEM; > > - ret = devm_request_threaded_irq(&client->dev, client->irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, > - IRQF_TRIGGER_FALLING | > - IRQF_ONESHOT, > - "mxc4005_event", > - data->dready_trig); > + ret = devm_request_irq(&client->dev, client->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_TRIGGER_FALLING | IRQF_NO_THREAD, > + "mxc4005_event", data->dready_trig); > if (ret) { > dev_err(&client->dev, > "failed to init threaded irq\n"); > diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c > index 384f1fbcbcb37..a9ff2a273fe1c 100644 > --- a/drivers/iio/accel/stk8ba50.c > +++ b/drivers/iio/accel/stk8ba50.c > @@ -428,13 +428,10 @@ static int stk8ba50_probe(struct i2c_client *client) > } > > if (client->irq > 0) { > - ret = devm_request_threaded_irq(&client->dev, client->irq, > - stk8ba50_data_rdy_trig_poll, > - NULL, > - IRQF_TRIGGER_RISING | > - IRQF_ONESHOT, > - "stk8ba50_event", > - indio_dev); > + ret = devm_request_irq(&client->dev, client->irq, > + stk8ba50_data_rdy_trig_poll, > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > + "stk8ba50_event", indio_dev); > if (ret < 0) { > dev_err(&client->dev, "request irq %d failed\n", > client->irq); > diff --git a/drivers/iio/adc/ad4170-4.c b/drivers/iio/adc/ad4170-4.c > index efaed92191f1b..82205bfae531e 100644 > --- a/drivers/iio/adc/ad4170-4.c > +++ b/drivers/iio/adc/ad4170-4.c > @@ -2973,7 +2973,7 @@ static int ad4170_probe(struct spi_device *spi) > > if (spi->irq) { > ret = devm_request_irq(dev, spi->irq, &ad4170_irq_handler, > - IRQF_ONESHOT, indio_dev->name, indio_dev); > + IRQF_NO_THREAD, indio_dev->name, indio_dev); > if (ret) > return ret; > > diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c > index d96802b7847a6..84ce23c8e5782 100644 > --- a/drivers/iio/adc/ad7768-1.c > +++ b/drivers/iio/adc/ad7768-1.c > @@ -1394,9 +1394,8 @@ static int ad7768_probe(struct spi_device *spi) > if (ret) > return ret; > > - ret = devm_request_irq(&spi->dev, spi->irq, > - &ad7768_interrupt, > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > + ret = devm_request_irq(&spi->dev, spi->irq, &ad7768_interrupt, > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > indio_dev->name, indio_dev); > if (ret) > return ret; > diff --git a/drivers/iio/adc/ad7779.c b/drivers/iio/adc/ad7779.c > index aac5049c9a07b..695cc79e78da5 100644 > --- a/drivers/iio/adc/ad7779.c > +++ b/drivers/iio/adc/ad7779.c > @@ -840,7 +840,7 @@ static int ad7779_setup_without_backend(struct ad7779_state *st, struct > iio_dev > iio_trigger_set_drvdata(st->trig, st); > > ret = devm_request_irq(dev, st->spi->irq, iio_trigger_generic_data_rdy_poll, > - IRQF_ONESHOT | IRQF_NO_AUTOEN, indio_dev->name, > + IRQF_NO_THREAD | IRQF_NO_AUTOEN, indio_dev->name, > st->trig); > if (ret) > return dev_err_probe(dev, ret, "request IRQ %d failed\n", > diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c > index a6f21791c6859..ddc3721f3f688 100644 > --- a/drivers/iio/adc/mcp3911.c > +++ b/drivers/iio/adc/mcp3911.c > @@ -815,7 +815,7 @@ static int mcp3911_probe(struct spi_device *spi) > * don't enable the interrupt to avoid extra load on the system. > */ > ret = devm_request_irq(dev, spi->irq, &iio_trigger_generic_data_rdy_poll, > - IRQF_NO_AUTOEN | IRQF_ONESHOT, > + IRQF_NO_AUTOEN | IRQF_NO_THREAD, > indio_dev->name, adc->trig); > if (ret) > return ret; > diff --git a/drivers/iio/adc/ti-ads131e08.c b/drivers/iio/adc/ti-ads131e08.c > index c9a20024d6b11..a585621b0bc30 100644 > --- a/drivers/iio/adc/ti-ads131e08.c > +++ b/drivers/iio/adc/ti-ads131e08.c > @@ -827,7 +827,7 @@ static int ads131e08_probe(struct spi_device *spi) > if (spi->irq) { > ret = devm_request_irq(&spi->dev, spi->irq, > ads131e08_interrupt, > - IRQF_TRIGGER_FALLING | IRQF_ONESHOT, > + IRQF_TRIGGER_FALLING | IRQF_NO_THREAD, > spi->dev.driver->name, indio_dev); > if (ret) > return dev_err_probe(&spi->dev, ret, > diff --git a/drivers/iio/chemical/ens160_core.c b/drivers/iio/chemical/ens160_core.c > index 86bde4a91bf7e..bbc96c4c62838 100644 > --- a/drivers/iio/chemical/ens160_core.c > +++ b/drivers/iio/chemical/ens160_core.c > @@ -316,12 +316,9 @@ static int ens160_setup_trigger(struct iio_dev *indio_dev, int irq) > > indio_dev->trig = iio_trigger_get(trig); > > - ret = devm_request_threaded_irq(dev, irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, > - IRQF_ONESHOT, > - indio_dev->name, > - indio_dev->trig); > + ret = devm_request_irq(dev, irq, iio_trigger_generic_data_rdy_poll, > + IRQF_NO_THREAD, indio_dev->name, > + indio_dev->trig); > if (ret) > return dev_err_probe(dev, ret, "failed to request irq\n"); > > diff --git a/drivers/iio/gyro/adxrs290.c b/drivers/iio/gyro/adxrs290.c > index 8fcb41f45baac..3efe385ebedc4 100644 > --- a/drivers/iio/gyro/adxrs290.c > +++ b/drivers/iio/gyro/adxrs290.c > @@ -597,7 +597,7 @@ static int adxrs290_probe_trigger(struct iio_dev *indio_dev) > > ret = devm_request_irq(&st->spi->dev, st->spi->irq, > &iio_trigger_generic_data_rdy_poll, > - IRQF_ONESHOT, "adxrs290_irq", st->dready_trig); > + IRQF_NO_THREAD, "adxrs290_irq", st->dready_trig); > if (ret < 0) > return dev_err_probe(&st->spi->dev, ret, > "request irq %d failed\n", st->spi->irq); > diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c > index 0e5a512e3bb8f..d358f4d5e5da8 100644 > --- a/drivers/iio/health/afe4403.c > +++ b/drivers/iio/health/afe4403.c > @@ -540,11 +540,10 @@ static int afe4403_probe(struct spi_device *spi) > return ret; > } > > - ret = devm_request_threaded_irq(dev, afe->irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, IRQF_ONESHOT, > - AFE4403_DRIVER_NAME, > - afe->trig); > + ret = devm_request_irq(dev, afe->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_NO_THREAD, AFE4403_DRIVER_NAME, > + afe->trig); > if (ret) { > dev_err(dev, "Unable to request IRQ\n"); > return ret; > diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c > index 768d794e574b9..032da52a96d0e 100644 > --- a/drivers/iio/health/afe4404.c > +++ b/drivers/iio/health/afe4404.c > @@ -547,11 +547,10 @@ static int afe4404_probe(struct i2c_client *client) > return ret; > } > > - ret = devm_request_threaded_irq(dev, afe->irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, IRQF_ONESHOT, > - AFE4404_DRIVER_NAME, > - afe->trig); > + ret = devm_request_irq(dev, afe->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_NO_THREAD, AFE4404_DRIVER_NAME, > + afe->trig); > if (ret) { > dev_err(dev, "Unable to request IRQ\n"); > return ret; > diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c > index 6a73f6e2f1f06..a022e1805dff7 100644 > --- a/drivers/iio/magnetometer/bmc150_magn.c > +++ b/drivers/iio/magnetometer/bmc150_magn.c > @@ -906,12 +906,9 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap, > goto err_poweroff; > } > > - ret = request_threaded_irq(irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > - "bmc150_magn_event", > - data->dready_trig); > + ret = request_irq(irq, iio_trigger_generic_data_rdy_poll, > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > + "bmc150_magn_event", data->dready_trig); > if (ret < 0) { > dev_err(dev, "request irq %d failed\n", irq); > goto err_trigger_unregister; > diff --git a/drivers/iio/pressure/dlhl60d.c b/drivers/iio/pressure/dlhl60d.c > index 8bad7162fec64..e975b733ce0a1 100644 > --- a/drivers/iio/pressure/dlhl60d.c > +++ b/drivers/iio/pressure/dlhl60d.c > @@ -306,9 +306,9 @@ static int dlh_probe(struct i2c_client *client) > indio_dev->num_channels = ARRAY_SIZE(dlh_channels); > > if (client->irq > 0) { > - ret = devm_request_threaded_irq(&client->dev, client->irq, > - dlh_interrupt, NULL, > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > + ret = devm_request_irq(&client->dev, client->irq, > + dlh_interrupt, > + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > st->info->name, indio_dev); > if (ret) { > dev_err(&client->dev, "failed to allocate threaded irq"); > diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c > index 10bd3f221929d..d8d8c8936d177 100644 > --- a/drivers/iio/temperature/tmp006.c > +++ b/drivers/iio/temperature/tmp006.c > @@ -356,12 +356,10 @@ static int tmp006_probe(struct i2c_client *client) > > indio_dev->trig = iio_trigger_get(data->drdy_trig); > > - ret = devm_request_threaded_irq(&client->dev, client->irq, > - iio_trigger_generic_data_rdy_poll, > - NULL, > - IRQF_ONESHOT, > - "tmp006_irq", > - data->drdy_trig); > + ret = devm_request_irq(&client->dev, client->irq, > + iio_trigger_generic_data_rdy_poll, > + IRQF_NO_THREAD, "tmp006_irq", > + data->drdy_trig); > if (ret < 0) > return ret; > } ^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 19/21] iio: Use IRQF_NO_THREAD [not found] <20260123113708.416727-1-bigeasy@linutronix.de> 2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior @ 2026-01-23 11:37 ` Sebastian Andrzej Siewior 2026-01-23 14:50 ` Andy Shevchenko 2026-01-23 20:56 ` David Lechner 2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior 2 siblings, 2 replies; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-23 11:37 UTC (permalink / raw) To: linux-kernel Cc: linux-rt-devel, Thomas Gleixner, Sebastian Andrzej Siewior, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, linux-iio The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke other interrupt handler and this supposed to happen from within the hardirq. Use IRQF_NO_THREAD to forbid forced-threading. Cc: Jonathan Cameron <jic23@kernel.org> Cc: David Lechner <dlechner@baylibre.com> Cc: "Nuno Sá" <nuno.sa@analog.com> Cc: Andy Shevchenko <andy@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: linux-iio@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/iio/accel/bma180.c | 5 +++-- drivers/iio/adc/ad7766.c | 10 ++-------- drivers/iio/gyro/itg3200_buffer.c | 2 +- drivers/iio/light/si1145.c | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 8925f5279e627..7bc6761f51354 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -986,8 +986,9 @@ static int bma180_probe(struct i2c_client *client) } ret = devm_request_irq(dev, client->irq, - iio_trigger_generic_data_rdy_poll, IRQF_TRIGGER_RISING, - "bma180_event", data->trig); + iio_trigger_generic_data_rdy_poll, + IRQF_TRIGGER_RISING | IRQF_NO_THREAD, + "bma180_event", data->trig); if (ret) { dev_err(dev, "unable to request IRQ\n"); goto err_trigger_free; diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c index 4d570383ef025..9e4a66477d2d0 100644 --- a/drivers/iio/adc/ad7766.c +++ b/drivers/iio/adc/ad7766.c @@ -184,12 +184,6 @@ static const struct iio_info ad7766_info = { .read_raw = &ad7766_read_raw, }; -static irqreturn_t ad7766_irq(int irq, void *private) -{ - iio_trigger_poll(private); - return IRQ_HANDLED; -} - static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable) { struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig); @@ -260,8 +254,8 @@ static int ad7766_probe(struct spi_device *spi) * Some platforms might not allow the option to power it down so * don't enable the interrupt to avoid extra load on the system */ - ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq, - IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN, + ret = devm_request_irq(&spi->dev, spi->irq, iio_trigger_generic_data_rdy_poll, + IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD, dev_name(&spi->dev), ad7766->trig); if (ret < 0) diff --git a/drivers/iio/gyro/itg3200_buffer.c b/drivers/iio/gyro/itg3200_buffer.c index a624400a239cb..767b87b7feea7 100644 --- a/drivers/iio/gyro/itg3200_buffer.c +++ b/drivers/iio/gyro/itg3200_buffer.c @@ -120,7 +120,7 @@ int itg3200_probe_trigger(struct iio_dev *indio_dev) ret = request_irq(st->i2c->irq, &iio_trigger_generic_data_rdy_poll, - IRQF_TRIGGER_RISING, + IRQF_NO_THREAD | IRQF_TRIGGER_RISING, "itg3200_data_rdy", st->trig); if (ret) diff --git a/drivers/iio/light/si1145.c b/drivers/iio/light/si1145.c index f8eb251eca8dc..ef0abc4499b74 100644 --- a/drivers/iio/light/si1145.c +++ b/drivers/iio/light/si1145.c @@ -1248,7 +1248,7 @@ static int si1145_probe_trigger(struct iio_dev *indio_dev) ret = devm_request_irq(&client->dev, client->irq, iio_trigger_generic_data_rdy_poll, - IRQF_TRIGGER_FALLING, + IRQF_TRIGGER_FALLING | IRQF_NO_THREAD, "si1145_irq", trig); if (ret < 0) { -- 2.51.0 ^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD 2026-01-23 11:37 ` [PATCH 19/21] iio: Use IRQF_NO_THREAD Sebastian Andrzej Siewior @ 2026-01-23 14:50 ` Andy Shevchenko 2026-01-26 9:25 ` Sebastian Andrzej Siewior 2026-01-23 20:56 ` David Lechner 1 sibling, 1 reply; 29+ messages in thread From: Andy Shevchenko @ 2026-01-23 14:50 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, linux-iio On Fri, Jan 23, 2026 at 12:37:05PM +0100, Sebastian Andrzej Siewior wrote: > The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke > other interrupt handler and this supposed to happen from within the > hardirq. > > Use IRQF_NO_THREAD to forbid forced-threading. ... > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: Lars-Peter Clausen <lars@metafoo.de> > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > Cc: linux-iio@vger.kernel.org Same comment about Cc list. ... > ret = request_irq(st->i2c->irq, > &iio_trigger_generic_data_rdy_poll, > - IRQF_TRIGGER_RISING, > + IRQF_NO_THREAD | IRQF_TRIGGER_RISING, Maybe swap their positions as it's done everywhere else for the consistency's sake? > "itg3200_data_rdy", > st->trig); -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD 2026-01-23 14:50 ` Andy Shevchenko @ 2026-01-26 9:25 ` Sebastian Andrzej Siewior 0 siblings, 0 replies; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-26 9:25 UTC (permalink / raw) To: Andy Shevchenko Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, linux-iio On 2026-01-23 16:50:58 [+0200], Andy Shevchenko wrote: > > ret = request_irq(st->i2c->irq, > > &iio_trigger_generic_data_rdy_poll, > > - IRQF_TRIGGER_RISING, > > + IRQF_NO_THREAD | IRQF_TRIGGER_RISING, > > Maybe swap their positions as it's done everywhere else for the consistency's > sake? Almost missed this. I swapped the flags, re-ident-ed. Also updated the commit message that ad7766_irq() is identical to iio_trigger_generic_data_rdy_poll() and can be replaced. Hope that works for everyone. > > "itg3200_data_rdy", > > st->trig); Sebastian ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD 2026-01-23 11:37 ` [PATCH 19/21] iio: Use IRQF_NO_THREAD Sebastian Andrzej Siewior 2026-01-23 14:50 ` Andy Shevchenko @ 2026-01-23 20:56 ` David Lechner 2026-01-26 8:09 ` Sebastian Andrzej Siewior 1 sibling, 1 reply; 29+ messages in thread From: David Lechner @ 2026-01-23 20:56 UTC (permalink / raw) To: Sebastian Andrzej Siewior, linux-kernel Cc: linux-rt-devel, Thomas Gleixner, Jonathan Cameron, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, linux-iio On 1/23/26 5:37 AM, Sebastian Andrzej Siewior wrote: > The interrupt handler iio_trigger_generic_data_rdy_poll() will invoke > other interrupt handler and this supposed to happen from within the > hardirq. > > Use IRQF_NO_THREAD to forbid forced-threading. > ... > diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c > index 4d570383ef025..9e4a66477d2d0 100644 > --- a/drivers/iio/adc/ad7766.c > +++ b/drivers/iio/adc/ad7766.c > @@ -184,12 +184,6 @@ static const struct iio_info ad7766_info = { > .read_raw = &ad7766_read_raw, > }; > > -static irqreturn_t ad7766_irq(int irq, void *private) > -{ > - iio_trigger_poll(private); > - return IRQ_HANDLED; > -} > - Replacing this with iio_trigger_generic_data_rdy_poll() seems like a separate improvement that should be in a separate patch. At a minimum, the commit message should explain this change. But I expect the reason will make it obvious it should be a separate patch. > static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable) > { > struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig); > @@ -260,8 +254,8 @@ static int ad7766_probe(struct spi_device *spi) > * Some platforms might not allow the option to power it down so > * don't enable the interrupt to avoid extra load on the system > */ > - ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq, > - IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN, > + ret = devm_request_irq(&spi->dev, spi->irq, iio_trigger_generic_data_rdy_poll, > + IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD, > dev_name(&spi->dev), > ad7766->trig); > if (ret < 0) ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD 2026-01-23 20:56 ` David Lechner @ 2026-01-26 8:09 ` Sebastian Andrzej Siewior 2026-01-26 16:34 ` David Lechner 0 siblings, 1 reply; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-26 8:09 UTC (permalink / raw) To: David Lechner Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Jonathan Cameron, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, linux-iio On 2026-01-23 14:56:32 [-0600], David Lechner wrote: > > -static irqreturn_t ad7766_irq(int irq, void *private) > > -{ > > - iio_trigger_poll(private); > > - return IRQ_HANDLED; > > -} > > - > > Replacing this with iio_trigger_generic_data_rdy_poll() seems like a > separate improvement that should be in a separate patch. > > At a minimum, the commit message should explain this change. But I expect > the reason will make it obvious it should be a separate patch. The other use iio_trigger_generic_data_rdy_poll() as the handler except this one. Which uses a wrapper around it. It looked to easier to add this hunk. What do you want (split or keep)? > > static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable) > > { > > struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig); > > @@ -260,8 +254,8 @@ static int ad7766_probe(struct spi_device *spi) > > * Some platforms might not allow the option to power it down so > > * don't enable the interrupt to avoid extra load on the system > > */ > > - ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq, > > - IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN, > > + ret = devm_request_irq(&spi->dev, spi->irq, iio_trigger_generic_data_rdy_poll, > > + IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_NO_THREAD, > > dev_name(&spi->dev), > > ad7766->trig); > > if (ret < 0) Sebastian ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 19/21] iio: Use IRQF_NO_THREAD 2026-01-26 8:09 ` Sebastian Andrzej Siewior @ 2026-01-26 16:34 ` David Lechner 0 siblings, 0 replies; 29+ messages in thread From: David Lechner @ 2026-01-26 16:34 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Jonathan Cameron, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, linux-iio On 1/26/26 2:09 AM, Sebastian Andrzej Siewior wrote: > On 2026-01-23 14:56:32 [-0600], David Lechner wrote: >>> -static irqreturn_t ad7766_irq(int irq, void *private) >>> -{ >>> - iio_trigger_poll(private); >>> - return IRQ_HANDLED; >>> -} >>> - >> >> Replacing this with iio_trigger_generic_data_rdy_poll() seems like a >> separate improvement that should be in a separate patch. >> >> At a minimum, the commit message should explain this change. But I expect >> the reason will make it obvious it should be a separate patch. > > The other use iio_trigger_generic_data_rdy_poll() as the handler except > this one. Which uses a wrapper around it. It looked to easier to add > this hunk. > What do you want (split or keep)? > I would still expect a separate patch to replace the duplicate function with iio_trigger_generic_data_rdy_poll(). That change stands on it's own, so deserves a separate patch. ^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT [not found] <20260123113708.416727-1-bigeasy@linutronix.de> 2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior 2026-01-23 11:37 ` [PATCH 19/21] iio: Use IRQF_NO_THREAD Sebastian Andrzej Siewior @ 2026-01-23 11:37 ` Sebastian Andrzej Siewior 2026-01-23 14:51 ` Andy Shevchenko ` (2 more replies) 2 siblings, 3 replies; 29+ messages in thread From: Sebastian Andrzej Siewior @ 2026-01-23 11:37 UTC (permalink / raw) To: linux-kernel Cc: linux-rt-devel, Thomas Gleixner, Sebastian Andrzej Siewior, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, linux-iio Passing IRQF_ONESHOT ensures that the interrupt source is masked until the secondary (threaded) handler is done. If only a primary handler is used then the flag makes no sense because the interrupt can not fire (again) while its handler is running. The flag also disallows force-threading of the primary handler and the irq-core will warn about this. The force-threading functionality is required on PREEMPT_RT because the handler is using locks with can sleep on PREEMPT_RT. Remove IRQF_ONESHOT from irqflags. Cc: Jonathan Cameron <jic23@kernel.org> Cc: David Lechner <dlechner@baylibre.com> Cc: "Nuno Sá" <nuno.sa@analog.com> Cc: Andy Shevchenko <andy@kernel.org> Cc: linux-iio@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/iio/magnetometer/ak8975.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index 3fd0171e5d69b..d30315ad85ded 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -581,7 +581,7 @@ static int ak8975_setup_irq(struct ak8975_data *data) irq = gpiod_to_irq(data->eoc_gpiod); rc = devm_request_irq(&client->dev, irq, ak8975_irq_handler, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, + IRQF_TRIGGER_RISING, dev_name(&client->dev), data); if (rc < 0) { dev_err(&client->dev, "irq %d request failed: %d\n", irq, rc); -- 2.51.0 ^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT 2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior @ 2026-01-23 14:51 ` Andy Shevchenko 2026-01-27 19:37 ` Geert Uytterhoeven 2026-01-28 11:40 ` Nuno Sá 2 siblings, 0 replies; 29+ messages in thread From: Andy Shevchenko @ 2026-01-23 14:51 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, linux-iio On Fri, Jan 23, 2026 at 12:37:06PM +0100, Sebastian Andrzej Siewior wrote: > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > the secondary (threaded) handler is done. If only a primary handler is > used then the flag makes no sense because the interrupt can not fire > (again) while its handler is running. > The flag also disallows force-threading of the primary handler and the > irq-core will warn about this. > The force-threading functionality is required on PREEMPT_RT because the > handler is using locks with can sleep on PREEMPT_RT. > > Remove IRQF_ONESHOT from irqflags. ... > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: linux-iio@vger.kernel.org Same comment on the location of Cc list. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT 2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior 2026-01-23 14:51 ` Andy Shevchenko @ 2026-01-27 19:37 ` Geert Uytterhoeven 2026-01-28 11:40 ` Nuno Sá 2 siblings, 0 replies; 29+ messages in thread From: Geert Uytterhoeven @ 2026-01-27 19:37 UTC (permalink / raw) To: bigeasy Cc: andy, dlechner, jic23, linux-iio, linux-kernel, linux-rt-devel, nuno.sa, tglx, linux-renesas-soc, Geert Uytterhoeven Hi Sebastian, > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > the secondary (threaded) handler is done. If only a primary handler is > used then the flag makes no sense because the interrupt can not fire > (again) while its handler is running. > The flag also disallows force-threading of the primary handler and the > irq-core will warn about this. > The force-threading functionality is required on PREEMPT_RT because the > handler is using locks with can sleep on PREEMPT_RT. > > Remove IRQF_ONESHOT from irqflags. > > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: linux-iio@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Thanks for your patch! This fixes the WARNING: kernel/irq/manage.c:1491 at __setup_irq+0xb0/0x79c, CPU#0: swapper/0/1 I was seeing on the KZM-A9-GT board since commit aef30c8d569c0f31 ("genirq: Warn about using IRQF_ONESHOT without a threaded handler") in irqchip/irq/core. Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT 2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior 2026-01-23 14:51 ` Andy Shevchenko 2026-01-27 19:37 ` Geert Uytterhoeven @ 2026-01-28 11:40 ` Nuno Sá 2026-01-28 12:34 ` Andy Shevchenko 2 siblings, 1 reply; 29+ messages in thread From: Nuno Sá @ 2026-01-28 11:40 UTC (permalink / raw) To: Sebastian Andrzej Siewior, linux-kernel Cc: linux-rt-devel, Thomas Gleixner, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, linux-iio On Fri, 2026-01-23 at 12:37 +0100, Sebastian Andrzej Siewior wrote: > Passing IRQF_ONESHOT ensures that the interrupt source is masked until > the secondary (threaded) handler is done. If only a primary handler is > used then the flag makes no sense because the interrupt can not fire > (again) while its handler is running. > The flag also disallows force-threading of the primary handler and the > irq-core will warn about this. > The force-threading functionality is required on PREEMPT_RT because the > handler is using locks with can sleep on PREEMPT_RT. > > Remove IRQF_ONESHOT from irqflags. > > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: David Lechner <dlechner@baylibre.com> > Cc: "Nuno Sá" <nuno.sa@analog.com> > Cc: Andy Shevchenko <andy@kernel.org> > Cc: linux-iio@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- Reviewed-by: Nuno Sá <nuno.sa@analog.com> > drivers/iio/magnetometer/ak8975.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c > index 3fd0171e5d69b..d30315ad85ded 100644 > --- a/drivers/iio/magnetometer/ak8975.c > +++ b/drivers/iio/magnetometer/ak8975.c > @@ -581,7 +581,7 @@ static int ak8975_setup_irq(struct ak8975_data *data) > irq = gpiod_to_irq(data->eoc_gpiod); > > rc = devm_request_irq(&client->dev, irq, ak8975_irq_handler, > - IRQF_TRIGGER_RISING | IRQF_ONESHOT, > + IRQF_TRIGGER_RISING, > dev_name(&client->dev), data); > if (rc < 0) { > dev_err(&client->dev, "irq %d request failed: %d\n", irq, rc); ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT 2026-01-28 11:40 ` Nuno Sá @ 2026-01-28 12:34 ` Andy Shevchenko 0 siblings, 0 replies; 29+ messages in thread From: Andy Shevchenko @ 2026-01-28 12:34 UTC (permalink / raw) To: Nuno Sá Cc: Sebastian Andrzej Siewior, linux-kernel, linux-rt-devel, Thomas Gleixner, Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko, linux-iio On Wed, Jan 28, 2026 at 11:40:56AM +0000, Nuno Sá wrote: > On Fri, 2026-01-23 at 12:37 +0100, Sebastian Andrzej Siewior wrote: > Reviewed-by: Nuno Sá <nuno.sa@analog.com> There is the v2 available. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2026-01-28 13:54 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260123113708.416727-1-bigeasy@linutronix.de>
2026-01-23 11:37 ` [PATCH 18/21] iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD Sebastian Andrzej Siewior
2026-01-23 14:48 ` Andy Shevchenko
2026-01-23 16:47 ` Jonathan Cameron
2026-01-23 21:00 ` David Lechner
2026-01-26 8:15 ` Sebastian Andrzej Siewior
2026-01-26 9:51 ` Andy Shevchenko
2026-01-26 10:10 ` Sebastian Andrzej Siewior
2026-01-26 11:01 ` Andy Shevchenko
2026-01-26 14:29 ` Konstantin Ryabitsev
2026-01-26 14:57 ` Andy Shevchenko
2026-01-26 15:09 ` Konstantin Ryabitsev
2026-01-26 15:16 ` Andy Shevchenko
2026-01-28 10:45 ` Nuno Sá
2026-01-28 13:53 ` Konstantin Ryabitsev
2026-01-28 10:07 ` Sebastian Andrzej Siewior
2026-01-28 10:15 ` Andy Shevchenko
2026-01-26 10:53 ` Marcus Folkesson
2026-01-28 11:39 ` Nuno Sá
2026-01-23 11:37 ` [PATCH 19/21] iio: Use IRQF_NO_THREAD Sebastian Andrzej Siewior
2026-01-23 14:50 ` Andy Shevchenko
2026-01-26 9:25 ` Sebastian Andrzej Siewior
2026-01-23 20:56 ` David Lechner
2026-01-26 8:09 ` Sebastian Andrzej Siewior
2026-01-26 16:34 ` David Lechner
2026-01-23 11:37 ` [PATCH 20/21] iio: magnetometer: Remove IRQF_ONESHOT Sebastian Andrzej Siewior
2026-01-23 14:51 ` Andy Shevchenko
2026-01-27 19:37 ` Geert Uytterhoeven
2026-01-28 11:40 ` Nuno Sá
2026-01-28 12:34 ` Andy Shevchenko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox