Skip to content

Commit e467848

Browse files
superm1jwrdegoede
authored andcommitted
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: [email protected] # 6.1 Cc: "Mahapatra, Rajib" <[email protected]> Cc: "Raul Rangel" <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent b44fd99 commit e467848

File tree

1 file changed

+6
-0
lines changed
  • drivers/platform/x86/amd

1 file changed

+6
-0
lines changed

drivers/platform/x86/amd/pmc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,14 @@ static void amd_pmc_s2idle_prepare(void)
739739
static void amd_pmc_s2idle_check(void)
740740
{
741741
struct amd_pmc_dev *pdev = &pmc;
742+
struct smu_metrics table;
742743
int rc;
743744

745+
/* CZN: Ensure that future s0i3 entry attempts at least 10ms passed */
746+
if (pdev->cpu_id == AMD_CPU_ID_CZN && !get_metrics_table(pdev, &table) &&
747+
table.s0i3_last_entry_status)
748+
usleep_range(10000, 20000);
749+
744750
/* Dump the IdleMask before we add to the STB */
745751
amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
746752

0 commit comments

Comments
 (0)