Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tpmdd-next-v5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull tpm fixes Jarkko Sakkinen:
"Three fixes for rc2"

* tag 'tpmdd-next-v5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
tpm: Remove unintentional dump_stack() call
tpm, tpm_tis: Decorate tpm_tis_gen_interrupt() with request_locality()
tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality()

+25 -7
-2
drivers/char/tpm/tpm-chip.c
··· 278 278 { 279 279 struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs); 280 280 281 - dump_stack(); 282 - 283 281 /* release the master device reference */ 284 282 put_device(&chip->dev); 285 283 }
+25 -5
drivers/char/tpm/tpm_tis_core.c
··· 707 707 const char *desc = "attempting to generate an interrupt"; 708 708 u32 cap2; 709 709 cap_t cap; 710 + int ret; 710 711 712 + /* TPM 2.0 */ 711 713 if (chip->flags & TPM_CHIP_FLAG_TPM2) 712 714 return tpm2_get_tpm_pt(chip, 0x100, &cap2, desc); 713 - else 714 - return tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 715 - 0); 715 + 716 + /* TPM 1.2 */ 717 + ret = request_locality(chip, 0); 718 + if (ret < 0) 719 + return ret; 720 + 721 + ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0); 722 + 723 + release_locality(chip, 0); 724 + 725 + return ret; 716 726 } 717 727 718 728 /* Register the IRQ and issue a command that will cause an interrupt. If an ··· 1029 1019 init_waitqueue_head(&priv->read_queue); 1030 1020 init_waitqueue_head(&priv->int_queue); 1031 1021 if (irq != -1) { 1032 - /* Before doing irq testing issue a command to the TPM in polling mode 1022 + /* 1023 + * Before doing irq testing issue a command to the TPM in polling mode 1033 1024 * to make sure it works. May as well use that command to set the 1034 1025 * proper timeouts for the driver. 1035 1026 */ 1036 - if (tpm_get_timeouts(chip)) { 1027 + 1028 + rc = request_locality(chip, 0); 1029 + if (rc < 0) 1030 + goto out_err; 1031 + 1032 + rc = tpm_get_timeouts(chip); 1033 + 1034 + release_locality(chip, 0); 1035 + 1036 + if (rc) { 1037 1037 dev_err(dev, "Could not get TPM timeouts and durations\n"); 1038 1038 rc = -ENODEV; 1039 1039 goto out_err;