]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
platform/x86/amd: pmc: Utilize SMN index 0 for driver probe
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Sun, 9 Apr 2023 18:53:45 +0000 (00:23 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:16:53 +0000 (12:16 +0200)
commit3c13a883b012f9ef39175262a8acc3c7b5ff7387
treea0cdbc2e2cfff642e380ab512c8c4a90ffe65d11
parent0e11ebea41fe848459a99a36cddc8fb45b903a7e
platform/x86/amd: pmc: Utilize SMN index 0 for driver probe

BugLink: https://bugs.launchpad.net/bugs/2025067
[ Upstream commit 310e782a99c7f16fb533a45d8f9c16defefa5aab ]

The current SMN index used for the driver probe seems to be meant
for the BIOS pair and there are potential concurrency problems that can
occur with an inopportune SMI.

It is been advised to use SMN_INDEX_0 instead of SMN_INDEX_2, which is
what amd_nb.c provides and this function has protections to ensure that
only one caller can use it at a time.

Fixes: 156ec4731cb2 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle")
Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230409185348.556161-6-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/platform/x86/amd/Kconfig
drivers/platform/x86/amd/pmc.c