Skip to content

Commit ec07b3e

Browse files
committed
tpm: ibmvtpm: Set TPM_OPS_AUTO_STARTUP flag on driver
JIRA: https://issues.redhat.com/browse/RHEL-72765 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Conflicts: Missing file and lines due to missing d2add27. commit 02e9bda Author: Stefan Berger <stefanb@linux.ibm.com> Date: Mon Oct 14 10:16:43 2024 -0400 tpm: ibmvtpm: Set TPM_OPS_AUTO_STARTUP flag on driver Set the TPM_OPS_AUTO_STARTUP on the driver so that the ibmvtpm driver now uses tpm2_auto_startup and tpm1_auto_startup like many other drivers do. Remove tpm_get_timeouts, tpm2_get_cc_attrs_tbl, and tpm2_sessions_init calls from it since these will all be called in tpm2_auto_startup and tpm1_auto_startup. The exporting of the tpm2_session_init symbol was only necessary while the ibmvtpm driver was calling this function. Since this is not the case anymore, remove this symbol from being exported. What is new for the ibmvtpm driver is that now tpm2_do_selftest and tpm1_do_selftest will be called that send commands to the TPM to perform or continue its selftest. However, the firmware should already have sent these commands so that the TPM will not do much work at this time. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> 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 a86c4c6 commit ec07b3e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/char/tpm/tpm_ibmvtpm.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ static bool tpm_ibmvtpm_req_canceled(struct tpm_chip *chip, u8 status)
450450
}
451451

452452
static const struct tpm_class_ops tpm_ibmvtpm = {
453+
.flags = TPM_OPS_AUTO_STARTUP,
453454
.recv = tpm_ibmvtpm_recv,
454455
.send = tpm_ibmvtpm_send,
455456
.cancel = tpm_ibmvtpm_cancel,
@@ -690,16 +691,6 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
690691
if (!strcmp(id->compat, "IBM,vtpm20"))
691692
chip->flags |= TPM_CHIP_FLAG_TPM2;
692693

693-
rc = tpm_get_timeouts(chip);
694-
if (rc)
695-
goto init_irq_cleanup;
696-
697-
if (chip->flags & TPM_CHIP_FLAG_TPM2) {
698-
rc = tpm2_get_cc_attrs_tbl(chip);
699-
if (rc)
700-
goto init_irq_cleanup;
701-
}
702-
703694
return tpm_chip_register(chip);
704695
init_irq_cleanup:
705696
do {

0 commit comments

Comments
 (0)