]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86/amd/pmf: Move out of BIOS SMN pair for driver probe
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Thu, 6 Apr 2023 16:48:07 +0000 (22:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:14 +0000 (23:03 +0900)
commitcae059aa61a1200534339d19c0614b06a7d72595
treea139e7234014cfc5ba7dfc7f43a96165a0facfd8
parent87877cae47ecfa9472280976471f8e83490bed66
platform/x86/amd/pmf: Move out of BIOS SMN pair for driver probe

[ Upstream commit aec8298c093f052fc8a86f9411b69b23953b0edb ]

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: f3e11f9f79fe ("platform/x86/amd/pmf: Add support for PMF core layer")
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230406164807.50969-4-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>
drivers/platform/x86/amd/pmf/Kconfig
drivers/platform/x86/amd/pmf/core.c