aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/cardbus/(public-mirror)
diff options
context:
space:
mode:
authorJoseph Mingrone <jrm@FreeBSD.org>2026-09-26 19:12:47 +0000
committerJoseph Mingrone <jrm@FreeBSD.org>2026-09-27 16:20:34 +0000
commit943686575d818c5cd3aaf2dfb912fabfb7dd7872 (patch)
treea507400268e0e3921ea20ee5b5b736dc144c8b90 /sys/modules/cardbus/(public-mirror)
parentb98d169d1f910e0b28c7ea2f26fcc09f83614ec9 (diff)
tpm: Do not use timed tsleep() while polling during cold bootHEADmain
Commit 4e0f283fb97a made tpm_tis12_init() wait for TPM_STS_CMD_READY after aborting any command. The wait is implemented by the driver's existing tpm_waitfor_poll() loop, which sleeps with a one-tick tsleep() between status reads. Until now, that loop only ran from the resume and command paths after boot. From tpm_attach() it can panic with "timed sleep before timers are working" when the TPM is attached from ACPI during cold boot and the chip does not report ready on the first status read. Before 4e0f283fb97a, tpm_tis12_init() wrote TPM_STS_CMD_READY and returned without waiting, so the polling loops only ran after boot. tpm_request_locality() had the same latent hazard but its fast path returns before sleeping whenever locality is already active. Nothing calls wakeup() on the channels used by these polling loops, so the sleeps are pure delays. Use pause_sig(), which falls back to DELAY() while the kernel is cold and returns EWOULDBLOCK, a value these loops already tolerate. The c argument to tpm_waitfor_poll() is now unused. It is left in place to keep this change minimal for MFC and can be removed in a follow-up. Reviewed by: kbowling Fixes: 4e0f283fb97a ("tpm: Bound TPM 1.2 locality ownership") MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D60050
Diffstat (limited to 'sys/modules/cardbus/(public-mirror)')
0 files changed, 0 insertions, 0 deletions