public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/21] char: tpm: cr50: Remove IRQF_ONESHOT
       [not found] <20260123113708.416727-1-bigeasy@linutronix.de>
@ 2026-01-23 11:36 ` Sebastian Andrzej Siewior
  2026-01-25 16:50   ` Jarkko Sakkinen
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-01-23 11:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-rt-devel, Thomas Gleixner, Sebastian Andrzej Siewior,
	Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe, linux-integrity

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.

Remove IRQF_ONESHOT from irqflags.

Cc: Peter Huewe <peterhuewe@gmx.de>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-integrity@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/char/tpm/tpm_tis_i2c_cr50.c | 3 +--
 drivers/char/tpm/tpm_tis_spi_cr50.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/char/tpm/tpm_tis_i2c_cr50.c b/drivers/char/tpm/tpm_tis_i2c_cr50.c
index fc6891a0b6936..b48cacacc0664 100644
--- a/drivers/char/tpm/tpm_tis_i2c_cr50.c
+++ b/drivers/char/tpm/tpm_tis_i2c_cr50.c
@@ -749,8 +749,7 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
 
 	if (client->irq > 0) {
 		rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
-				      IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
-				      IRQF_NO_AUTOEN,
+				      IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
 				      dev->driver->name, chip);
 		if (rc < 0) {
 			dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
diff --git a/drivers/char/tpm/tpm_tis_spi_cr50.c b/drivers/char/tpm/tpm_tis_spi_cr50.c
index f4937280e9406..32920b4cecfb4 100644
--- a/drivers/char/tpm/tpm_tis_spi_cr50.c
+++ b/drivers/char/tpm/tpm_tis_spi_cr50.c
@@ -287,7 +287,7 @@ int cr50_spi_probe(struct spi_device *spi)
 	if (spi->irq > 0) {
 		ret = devm_request_irq(&spi->dev, spi->irq,
 				       cr50_spi_irq_handler,
-				       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+				       IRQF_TRIGGER_RISING,
 				       "cr50_spi", cr50_phy);
 		if (ret < 0) {
 			if (ret == -EPROBE_DEFER)
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/21] char: tpm: cr50: Remove IRQF_ONESHOT
  2026-01-23 11:36 ` [PATCH 09/21] char: tpm: cr50: Remove IRQF_ONESHOT Sebastian Andrzej Siewior
@ 2026-01-25 16:50   ` Jarkko Sakkinen
  2026-01-27 15:45     ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Sakkinen @ 2026-01-25 16:50 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Peter Huewe,
	Jason Gunthorpe, linux-integrity

On Fri, Jan 23, 2026 at 12:36:55PM +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.
> 
> Remove IRQF_ONESHOT from irqflags.
> 
> Cc: Peter Huewe <peterhuewe@gmx.de>
> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: linux-integrity@vger.kernel.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  drivers/char/tpm/tpm_tis_i2c_cr50.c | 3 +--
>  drivers/char/tpm/tpm_tis_spi_cr50.c | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_tis_i2c_cr50.c b/drivers/char/tpm/tpm_tis_i2c_cr50.c
> index fc6891a0b6936..b48cacacc0664 100644
> --- a/drivers/char/tpm/tpm_tis_i2c_cr50.c
> +++ b/drivers/char/tpm/tpm_tis_i2c_cr50.c
> @@ -749,8 +749,7 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
>  
>  	if (client->irq > 0) {
>  		rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
> -				      IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
> -				      IRQF_NO_AUTOEN,
> +				      IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
>  				      dev->driver->name, chip);
>  		if (rc < 0) {
>  			dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
> diff --git a/drivers/char/tpm/tpm_tis_spi_cr50.c b/drivers/char/tpm/tpm_tis_spi_cr50.c
> index f4937280e9406..32920b4cecfb4 100644
> --- a/drivers/char/tpm/tpm_tis_spi_cr50.c
> +++ b/drivers/char/tpm/tpm_tis_spi_cr50.c
> @@ -287,7 +287,7 @@ int cr50_spi_probe(struct spi_device *spi)
>  	if (spi->irq > 0) {
>  		ret = devm_request_irq(&spi->dev, spi->irq,
>  				       cr50_spi_irq_handler,
> -				       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
> +				       IRQF_TRIGGER_RISING,
>  				       "cr50_spi", cr50_phy);
>  		if (ret < 0) {
>  			if (ret == -EPROBE_DEFER)
> -- 
> 2.51.0
> 

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

Shoud I pick this? I did apply it to my master branch (not next).

BR, Jarkko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/21] char: tpm: cr50: Remove IRQF_ONESHOT
  2026-01-25 16:50   ` Jarkko Sakkinen
@ 2026-01-27 15:45     ` Sebastian Andrzej Siewior
  2026-01-28 23:17       ` Jarkko Sakkinen
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-01-27 15:45 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Peter Huewe,
	Jason Gunthorpe, linux-integrity

On 2026-01-25 18:50:00 [+0200], Jarkko Sakkinen wrote:
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> 
> Shoud I pick this? I did apply it to my master branch (not next).

I am about to prepare a v2 and if you take it I am going to drop it.
Shouldn't you apply it, then I hope to route leftovers via the genirq
tree.

> BR, Jarkko

Sebastian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/21] char: tpm: cr50: Remove IRQF_ONESHOT
  2026-01-27 15:45     ` Sebastian Andrzej Siewior
@ 2026-01-28 23:17       ` Jarkko Sakkinen
  0 siblings, 0 replies; 4+ messages in thread
From: Jarkko Sakkinen @ 2026-01-28 23:17 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-kernel, linux-rt-devel, Thomas Gleixner, Peter Huewe,
	Jason Gunthorpe, linux-integrity

On Tue, Jan 27, 2026 at 04:45:30PM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-01-25 18:50:00 [+0200], Jarkko Sakkinen wrote:
> > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> > 
> > Shoud I pick this? I did apply it to my master branch (not next).
> 
> I am about to prepare a v2 and if you take it I am going to drop it.
> Shouldn't you apply it, then I hope to route leftovers via the genirq
> tree.

Please route through genirq tree.

> 
> > BR, Jarkko
> 
> Sebastian

BR, Jarkko

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-28 23:17 UTC | newest]

Thread overview: 4+ 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:36 ` [PATCH 09/21] char: tpm: cr50: Remove IRQF_ONESHOT Sebastian Andrzej Siewior
2026-01-25 16:50   ` Jarkko Sakkinen
2026-01-27 15:45     ` Sebastian Andrzej Siewior
2026-01-28 23:17       ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox