OSDN Git Service

platform/x86/amd: pmc: Add a workaround for an s0i3 issue on Cezanne
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 16 Nov 2022 15:43:41 +0000 (09:43 -0600)
committerHans de Goede <hdegoede@redhat.com>
Wed, 7 Dec 2022 14:27:49 +0000 (15:27 +0100)
commite4678483f9bc400642bbc05c6b75a1b44bcb6c25
treeb56cb0cd5da3a582803fa111876a5c6b888feeaf
parentb44fd994e45112b58b6c1dec4451d9a925784589
platform/x86/amd: pmc: Add a workaround for an s0i3 issue on Cezanne

Cezanne platforms under the right circumstances have a synchronization
problem where attempting to enter s2idle may fail if the x86 cores are
put into HLT before hardware resume from the previous attempt has
completed.

To avoid this issue add a 10-20ms delay before entering s2idle another
time. This workaround will only be applied on interrupts that wake the
hardware but don't break the s2idle loop.

Cc: stable@vger.kernel.org # 6.1
Cc: "Mahapatra, Rajib" <Rajib.Mahapatra@amd.com>
Cc: "Raul Rangel" <rrangel@chromium.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20221116154341.13382-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd/pmc.c