]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (k10temp) Use API function to access System Management Network
authorGuenter Roeck <linux@roeck-us.net>
Fri, 4 May 2018 20:01:33 +0000 (13:01 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 13 May 2018 16:00:49 +0000 (09:00 -0700)
commit4d6e85d382091790473432e5689fa5a20e8b2136
tree4cbb66909c00f5d361648da1ad1da37e0bacfc22
parent292e836276ed963b2bf36342ccd365e864e87477
hwmon: (k10temp) Use API function to access System Management Network

The SMN (System Management Network) on Family 17h AMD CPUs is also accessed
from other drivers, specifically EDAC. Accessing it directly is racy.
On top of that, accessing the SMN through root bridge 00:00 is wrong on
multi-die CPUs and may result in reading the temperature from the wrong
die. Use available API functions to fix the problem.

For this to work, add dependency on AMD_NB. Also change the Raven Ridge
PCI device ID to point to Data Fabric Function 3, since this ID is used
by the API functions to find the CPU node.

Cc: stable@vger.kernel.org # v4.16+
Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/Kconfig
drivers/hwmon/k10temp.c