Skip to content

Commit b506324

Browse files
committed
tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register
JIRA: https://issues.redhat.com/browse/RHEL-72765 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit 282657a Author: Lino Sanfilippo <l.sanfilippo@kunbus.com> Date: Thu Nov 24 14:55:26 2022 +0100 tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register In disable_interrupts() the TPM_GLOBAL_INT_ENABLE bit is unset in the TPM_INT_ENABLE register to shut the interrupts off. However modifying the register is only possible with a held locality. So claim the locality before disable_interrupts() is called. 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 f65dc7a commit b506324

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/char/tpm/tpm_tis_core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,11 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
10891089
dev_err(&chip->dev, FW_BUG
10901090
"TPM interrupt not working, polling instead\n");
10911091

1092+
rc = request_locality(chip, 0);
1093+
if (rc < 0)
1094+
goto out_err;
10921095
disable_interrupts(chip);
1096+
release_locality(chip, 0);
10931097
}
10941098
} else {
10951099
tpm_tis_probe_irq(chip, intmask);

0 commit comments

Comments
 (0)