[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1619394440-30646-2-git-send-email-LinoSanfilippo@gmx.de>
Date: Mon, 26 Apr 2021 01:47:17 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: peterhuewe@....de, jarkko@...nel.org, jgg@...pe.ca
Cc: stefanb@...ux.vnet.ibm.com, James.Bottomley@...senpartnership.com,
keescook@...omium.org, jsnitsel@...hat.com, ml.linux@...oe.vision,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
LinoSanfilippo@....de
Subject: [PATCH v2 1/4] tpm: Use a threaded interrupt handler
Interrupt handling at least includes reading and writing the interrupt
status register from the interrupt routine. However over SPI those accesses
require a sleepable context, since a mutex is used in the concerning
functions.
For this reason request a threaded interrupt handler which is running in
(sleepable) process context.
Signed-off-by: Lino Sanfilippo <LinoSanfilippo@....de>
---
drivers/char/tpm/tpm_tis_core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index e7d1eab..0959559 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -781,8 +781,10 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
int rc;
u32 int_status;
- if (devm_request_irq(chip->dev.parent, irq, tis_int_handler, flags,
- dev_name(&chip->dev), chip) != 0) {
+
+ if (devm_request_threaded_irq(chip->dev.parent, irq, NULL,
+ tis_int_handler, IRQF_ONESHOT | flags,
+ dev_name(&chip->dev), chip) != 0) {
dev_info(&chip->dev, "Unable to request irq: %d for probe\n",
irq);
return -1;
--
2.7.4
Powered by blists - more mailing lists