]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/hwmon/Kconfig
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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:27:47 +0000 (12:27 +0200)
commite0743212ac71f29baa390d24eb08c64f8bfecfc4
treedb0bab5fd677661120119b09bb64bfe9376ea95c
parentb8af4dea98604973cdee588e34ecbc9bdb790ac4
hwmon: (k10temp) Use API function to access System Management Network

BugLink: http://bugs.launchpad.net/bugs/1782846
commit 3b031622f598481970400519bd5abc2a16708282 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hwmon/Kconfig
drivers/hwmon/k10temp.c