]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86/amd: pmc: Read SMU version during suspend on Cezanne systems
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 20 Oct 2022 11:37:49 +0000 (06:37 -0500)
committerHans de Goede <hdegoede@redhat.com>
Mon, 24 Oct 2022 09:27:35 +0000 (11:27 +0200)
commit608100779108adf0e4eb86e662907c024bf5fd82
tree79dfcd57a5aeecc85ebff3d9b1b668dab4fdc506
parent3a3d32e1cc2c4c12969510e5009512c8588b2db2
platform/x86/amd: pmc: Read SMU version during suspend on Cezanne systems

commit 679fa8f486ab ("platform/x86: amd-pmc: Avoid reading SMU version at
probe time") adjusted the behavior for amd-pmc to avoid reading the SMU
version at startup but rather on first use to improve boot time.

However the SMU version is also used to decide whether to place a timer
based wakeup in the OS_HINT message. If the idlemask hasn't been read
before this message was sent then the SMU version will not have been
cached.

Ensure the SMU version has been read before deciding whether or not to
run this codepath.

Cc: stable@vger.kernel.org # 6.0
Reported-by: You-Sheng Yang <vicamo.yang@canonical.com>
Tested-by: Anson Tsao <anson.tsao@amd.com>
Fixes: 679fa8f486ab ("platform/x86: amd-pmc: Avoid reading SMU version at probe time")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20221020113749.6621-2-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