Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUs

The max junction temperature of Atom N450/D410/D510 CPUs is 100 degrees
Celsius. Since these CPUs are always coupled with Intel NM10 chipset in
one package, the best way to verify whether an Atom CPU is N450/D410/D510
is to check the host bridge device.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Acked-by: Huaxu Wan <huaxu.wan@intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by

Yong Wang and committed by
Jean Delvare
1fe63ab4 c5114a1c

+15 -3
+1 -1
drivers/hwmon/Kconfig
··· 392 392 393 393 config SENSORS_CORETEMP 394 394 tristate "Intel Core/Core2/Atom temperature sensor" 395 - depends on X86 && EXPERIMENTAL 395 + depends on X86 && PCI && EXPERIMENTAL 396 396 help 397 397 If you say yes here you get support for the temperature 398 398 sensor inside your CPU. Most of the family 6 CPUs
+14 -2
drivers/hwmon/coretemp.c
··· 33 33 #include <linux/list.h> 34 34 #include <linux/platform_device.h> 35 35 #include <linux/cpu.h> 36 + #include <linux/pci.h> 36 37 #include <asm/msr.h> 37 38 #include <asm/processor.h> 38 39 ··· 162 161 int usemsr_ee = 1; 163 162 int err; 164 163 u32 eax, edx; 164 + struct pci_dev *host_bridge; 165 165 166 166 /* Early chips have no MSR for TjMax */ 167 167 ··· 170 168 usemsr_ee = 0; 171 169 } 172 170 173 - /* Atoms seems to have TjMax at 90C */ 171 + /* Atom CPUs */ 174 172 175 173 if (c->x86_model == 0x1c) { 176 174 usemsr_ee = 0; 177 - tjmax = 90000; 175 + 176 + host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)); 177 + 178 + if (host_bridge && host_bridge->vendor == PCI_VENDOR_ID_INTEL 179 + && (host_bridge->device == 0xa000 /* NM10 based nettop */ 180 + || host_bridge->device == 0xa010)) /* NM10 based netbook */ 181 + tjmax = 100000; 182 + else 183 + tjmax = 90000; 184 + 185 + pci_dev_put(host_bridge); 178 186 } 179 187 180 188 if ((c->x86_model > 0xe) && (usemsr_ee)) {