Skip to content

Commit d384ff9

Browse files
committed
tpm, tpm_tis: Claim locality in 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 0e06926 Author: Lino Sanfilippo <l.sanfilippo@kunbus.com> Date: Thu Nov 24 14:55:35 2022 +0100 tpm, tpm_tis: Claim locality in interrupt handler Writing the TPM_INT_STATUS register in the interrupt handler to clear the interrupts only has effect if a locality is held. Since this is not guaranteed at the time the interrupt is fired, claim the locality explicitly in the 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 bb09ba3 commit d384ff9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/char/tpm/tpm_tis_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,9 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
758758
wake_up_interruptible(&priv->int_queue);
759759

760760
/* Clear interrupts handled with TPM_EOI */
761+
tpm_tis_request_locality(chip, 0);
761762
rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), interrupt);
763+
tpm_tis_relinquish_locality(chip, 0);
762764
if (rc < 0)
763765
return IRQ_NONE;
764766

0 commit comments

Comments
 (0)