From: Guenter Roeck Date: Sat, 28 Apr 2018 19:54:19 +0000 (-0700) Subject: Use API function to access SMN for family 17h X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2c52dee776e51290ded93a9342ac72b93b21b1d3;p=groeck-k10temp Use API function to access SMN for family 17h SMN is also accessed by EDAC code and needs to be synchronized to avoid race conditions. Signed-off-by: Guenter Roeck --- diff --git a/k10temp.c b/k10temp.c index 746ca82..94c4a04 100644 --- a/k10temp.c +++ b/k10temp.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "compat.h" @@ -142,8 +143,8 @@ static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval) static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval) { - amd_nb_index_read(pdev, PCI_DEVFN(0, 0), 0x60, - F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval); + amd_smn_read(amd_pci_dev_to_node_id(pdev), + F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval); } unsigned int get_raw_temp(struct k10temp_data *data)