Skip to content

Commit bb09ba3

Browse files
committed
tpm, tpm_tis: Request threaded interrupt handler
JIRA: https://issues.redhat.com/browse/RHEL-72765 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit 0c7e66e Author: Lino Sanfilippo <l.sanfilippo@kunbus.com> Date: Thu Nov 24 14:55:34 2022 +0100 tpm, tpm_tis: Request threaded interrupt handler The TIS interrupt handler at least has to read and write the interrupt status register. In case of SPI both operations result in a call to tpm_tis_spi_transfer() which uses the bus_lock_mutex of the spi device and thus must only be called from a sleepable context. To ensure this request a threaded interrupt handler. Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Tested-by: Michael Niewöhner <linux@mniewoehner.de> Tested-by: Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
1 parent 2eadc1b commit bb09ba3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/char/tpm/tpm_tis_core.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,11 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
791791
int rc;
792792
u32 int_status;
793793

794-
if (devm_request_irq(chip->dev.parent, irq, tis_int_handler, flags,
795-
dev_name(&chip->dev), chip) != 0) {
794+
795+
rc = devm_request_threaded_irq(chip->dev.parent, irq, NULL,
796+
tis_int_handler, IRQF_ONESHOT | flags,
797+
dev_name(&chip->dev), chip);
798+
if (rc) {
796799
dev_info(&chip->dev, "Unable to request irq: %d for probe\n",
797800
irq);
798801
return -1;

0 commit comments

Comments
 (0)