]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwmon: (k10temp) Rely on subsystem locking
authorGuenter Roeck <linux@roeck-us.net>
Sun, 7 Sep 2025 22:36:01 +0000 (15:36 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 17 Oct 2025 12:59:12 +0000 (05:59 -0700)
Attribute access is now serialized in the hardware monitoring core,
so locking in the driver code is no longer necessary. Drop it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/k10temp.c

index b98d5ec72c4ff16105e8a05e050928c0c1506b7d..7fc1d97a9971810b09a7ba89bbcefd9cdd0b92d7 100644 (file)
@@ -31,9 +31,6 @@ static bool force;
 module_param(force, bool, 0444);
 MODULE_PARM_DESC(force, "force loading on processors with erratum 319");
 
-/* Provide lock for writing to NB_SMU_IND_ADDR */
-static DEFINE_MUTEX(nb_smu_ind_mutex);
-
 #ifndef PCI_DEVICE_ID_AMD_15H_M70H_NB_F3
 #define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3       0x15b3
 #endif
@@ -137,12 +134,10 @@ static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
 static void amd_nb_index_read(struct pci_dev *pdev, unsigned int devfn,
                              unsigned int base, int offset, u32 *val)
 {
-       mutex_lock(&nb_smu_ind_mutex);
        pci_bus_write_config_dword(pdev->bus, devfn,
                                   base, offset);
        pci_bus_read_config_dword(pdev->bus, devfn,
                                  base + 4, val);
-       mutex_unlock(&nb_smu_ind_mutex);
 }
 
 static void read_htcreg_nb_f15(struct pci_dev *pdev, u32 *regval)