Unverified Commit f8afb12a authored by Jake Hillion's avatar Jake Hillion Committed by Ilpo Järvinen
Browse files

x86/platform/amd: move final timeout check to after final sleep



__hsmp_send_message sleeps between result read attempts and has a
timeout of 100ms. Under extreme load it's possible for these sleeps to
take a long time, exceeding the 100ms. In this case the current code
does not check the register and fails with ETIMEDOUT.

Refactor the loop to ensure there is at least one read of the register
after a sleep of any duration. This removes instances of ETIMEDOUT with
a single caller, even with a misbehaving scheduler. Tested on AMD
Bergamo machines.

Suggested-by: default avatarBlaise Sanouillet <linux@blaise.sanouillet.com>
Reviewed-by: default avatarSuma Hegde <suma.hegde@amd.com>
Tested-by: default avatarSuma Hegde <suma.hegde@amd.com>
Signed-off-by: default avatarJake Hillion <jake@hillion.co.uk>
Link: https://lore.kernel.org/r/20250605-amd-hsmp-v2-1-a811bc3dd74a@hillion.co.uk


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 4dbd1179
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment