Commit 4e0f283fb97a made tpm_tis12_init() wait for TPM_STS_CMD_READY
after aborting any in-flight 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.
Fixes: 4e0f283fb97a (tpm: Bound TPM 1.2 locality ownership)
MFC after: 1 week