From: Yong Wang <yong.y.wang@linux.intel.com>
To: Rudolf Marek <r.marek@assembler.cz>,
Huaxu Wan <huaxu.wan@intel.com>,
Jean Delvare <khali@linux-fr.org>
Cc: lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: [PATCH] hwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUs
Date: Thu, 24 Dec 2009 15:31:02 +0800 [thread overview]
Message-ID: <20091224073102.GA23058@ywang-moblin2.bj.intel.com> (raw)
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>
---
drivers/hwmon/coretemp.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index caef39c..65a33ec 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -33,6 +33,7 @@
#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/cpu.h>
+#include <linux/pci.h>
#include <asm/msr.h>
#include <asm/processor.h>
@@ -161,6 +162,7 @@ static int __devinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *
int usemsr_ee = 1;
int err;
u32 eax, edx;
+ struct pci_dev *host_bridge;
/* Early chips have no MSR for TjMax */
@@ -168,11 +170,21 @@ static int __devinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *
usemsr_ee = 0;
}
- /* Atoms seems to have TjMax at 90C */
+ /* Atoms CPUs */
if (c->x86_model == 0x1c) {
usemsr_ee = 0;
- tjmax = 90000;
+
+ host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
+
+ if (host_bridge && host_bridge->vendor == PCI_VENDOR_ID_INTEL
+ && (host_bridge->device == 0xa000 /* NM10 based nettop */
+ || host_bridge->device == 0xa010)) /* NM10 based netbook */
+ tjmax = 100000;
+ else
+ tjmax = 90000;
+
+ pci_dev_put(host_bridge);
}
if ((c->x86_model > 0xe) && (usemsr_ee)) {
next reply other threads:[~2009-12-24 7:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 7:31 Yong Wang [this message]
2010-01-06 15:08 ` [PATCH] hwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUs Jean Delvare
2010-01-10 19:06 ` [lm-sensors] " Jean Delvare
2010-01-11 6:20 ` Yong Wang
2010-01-16 2:02 ` Yuhong Bao
2010-01-17 15:15 ` Jean Delvare
2010-01-17 19:29 ` Robert Hancock
2010-01-17 20:05 ` Jean Delvare
2010-01-18 6:58 ` Yong Wang
2010-01-18 8:14 ` Jean Delvare
2010-01-18 8:27 ` Yong Wang
2010-01-18 7:21 ` Huaxu Wan
2010-01-18 8:07 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091224073102.GA23058@ywang-moblin2.bj.intel.com \
--to=yong.y.wang@linux.intel.com \
--cc=huaxu.wan@intel.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=r.marek@assembler.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox