From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>,
Jean Delvare <khali@linux-fr.org>,
Qiang Huang <h.huangqiang@huawei.com>
Subject: [PATCH 3.4 114/134] hwmon: (coretemp) Improve support for TjMax detection on Atom CPUs
Date: Wed, 9 Apr 2014 20:23:50 -0700 [thread overview]
Message-ID: <20140410032314.005473908@linuxfoundation.org> (raw)
In-Reply-To: <20140410032259.587501440@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
commit 41e58a1f2b90c88d94b4bd84beb9927a4c2704e9 upstream.
Atom CPUs don't have a register to retrieve TjMax. Detection so far was
incomplete. Use the X86 model ID to improve it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hwmon/coretemp.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -191,6 +191,24 @@ static ssize_t show_temp(struct device *
return tdata->valid ? sprintf(buf, "%d\n", tdata->temp) : -EAGAIN;
}
+struct tjmax {
+ char const *id;
+ int tjmax;
+};
+
+static struct tjmax __cpuinitconst tjmax_table[] = {
+ { "CPU D410", 100000 },
+ { "CPU D425", 100000 },
+ { "CPU D510", 100000 },
+ { "CPU D525", 100000 },
+ { "CPU N450", 100000 },
+ { "CPU N455", 100000 },
+ { "CPU N470", 100000 },
+ { "CPU N475", 100000 },
+ { "CPU 230", 100000 },
+ { "CPU 330", 125000 },
+};
+
static int __cpuinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id,
struct device *dev)
{
@@ -202,6 +220,13 @@ static int __cpuinit adjust_tjmax(struct
int err;
u32 eax, edx;
struct pci_dev *host_bridge;
+ int i;
+
+ /* explicit tjmax table entries override heuristics */
+ for (i = 0; i < ARRAY_SIZE(tjmax_table); i++) {
+ if (strstr(c->x86_model_id, tjmax_table[i].id))
+ return tjmax_table[i].tjmax;
+ }
/* Early chips have no MSR for TjMax */
next prev parent reply other threads:[~2014-04-10 3:23 UTC|newest]
Thread overview: 141+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 3:21 [PATCH 3.4 000/134] 3.4.87-stable review Greg Kroah-Hartman
2014-04-10 3:21 ` [PATCH 3.4 001/134] proc: pid/status: show all supplementary groups Greg Kroah-Hartman
2014-04-10 3:21 ` [PATCH 3.4 002/134] idr: fix top layer handling Greg Kroah-Hartman
2014-04-10 3:21 ` [PATCH 3.4 003/134] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 004/134] printk: Fix rq->lock vs logbuf_lock unlock lock inversion Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 005/134] workqueue: cond_resched() after processing each work item Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 006/134] compiler-gcc.h: Add gcc-recommended GCC_VERSION macro Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 007/134] compiler/gcc4: Add quirk for asm goto miscompilation bug Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 008/134] ipc, msg: fix message length check for negative values Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 009/134] idr: idr_for_each_entry() macro Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 010/134] pps: Add pps_lookup_dev() function Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 011/134] pps: Use pps_lookup_dev to reduce ldisc coupling Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 012/134] pps: Fix a use-after free bug when unregistering a source Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 013/134] selinux: correctly label /proc inodes in use before the policy is loaded Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 014/134] intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 015/134] HID: add quirk for Freescale i.MX28 ROM recovery Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 016/134] HID: usbhid: quirk for Formosa IR receiver Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 017/134] HID: validate feature and input report details Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 018/134] HID: multitouch: validate indexes details Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 019/134] HID: hidraw: add proper error handling to raw event reporting Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 020/134] HID: fix return value of hidraw_report_event() when !CONFIG_HIDRAW Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 021/134] HID: hidraw: fix list->buffer memleak Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 022/134] HID: hidraw: improve error handling in hidraw_init() Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 023/134] HID: apple: Add Apple wireless keyboard 2011 ANSI PID Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 024/134] HID: add support for Sony RF receiver with USB product id 0x0374 Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 025/134] HID: clean up quirk for Sony RF receivers Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 026/134] HID: usbhid: quirk for MSI GX680R led panel Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 027/134] HID: usbhid: fix build problem Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 028/134] HID: hidraw: correctly deallocate memory on device disconnect Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 029/134] ARM: dts: imx51-babbage: fix esdhc cd/wp properties Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 030/134] ARM: w90x900: fix legacy assembly syntax Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 031/134] ARM: u300: fix ages old copy/paste bug Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 032/134] ARM: 7742/1: topology: export cpu_topology Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 033/134] ARM: 7743/1: compressed/head.S: work around new binutils warning Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 034/134] ARM: footbridge: fix VGA initialisation Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 035/134] ARM: pxa: prevent PXA270 occasional reboot freezes Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 036/134] ARM: Orion: Set eth packet size csum offload limit Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 037/134] ARM: 7628/1: head.S: map one extra section for the ATAG/DTB area Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 038/134] ARM: 7791/1: a.out: remove partial a.out support Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 039/134] ath9k: Fix noisefloor calibration Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 040/134] ath9k: fill channel mode in caldata Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 041/134] ath9k_hw: Assign default xlna config for AR9485 Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 042/134] ath9k_htc: fix signal strength handling issues Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 043/134] ath9k_hw: fix chain swap setting when setting rx chainmask to 5 Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 044/134] ath9k_hw: Fix RX gain initvals for AR9485 Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 045/134] ath9k_hw: Enable hw PLL power save for AR9462 Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 046/134] USB: EHCI: bugfix: urb->hcpriv should not be NULL Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 047/134] USB: Add device quirk for Microsoft VX700 webcam Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 048/134] usb: Add quirk detection based on interface information Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 049/134] usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 050/134] ALSA: usb: Add quirk for 192KHz recording on E-Mu devices Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 051/134] ALSA: aloop: Fix Oops while PM resume Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 052/134] ALSA: hda - Fix non-snoop page handling Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 053/134] ALSA: hda - Add Conexant CX20751/2/3/4 codec support Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 054/134] Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs" Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 055/134] ALSA: hda - Always turn on pins for HDMI/DP Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 056/134] ALSA: hda - Fix internal mic for Lenovo Ideapad U300s Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 057/134] USB: serial: add modem-status-change wait queue Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 058/134] USB: ark3116: fix use-after-free in TIOCMIWAIT Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 059/134] USB: ch341: " Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 060/134] USB: cypress_m8: " Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 061/134] USB: ftdi_sio: " Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 062/134] USB: io_edgeport: " Greg Kroah-Hartman
2014-04-10 3:22 ` [PATCH 3.4 063/134] USB: io_ti: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 064/134] USB: mct_u232: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 065/134] USB: mos7840: fix broken TIOCMIWAIT Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 066/134] USB: mos7840: fix use-after-free in TIOCMIWAIT Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 067/134] USB: oti6858: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 068/134] USB: pl2303: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 069/134] USB: spcp8x5: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 070/134] USB: ssu100: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 071/134] USB: ti_usb_3410_5052: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 072/134] USB: serial: fix hang when opening port Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 073/134] USB: ftdi_sio: enable two UART ports on ST Microconnect Lite Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 074/134] usb: dwc3: gadget: free trb pool only from epnum 2 Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 075/134] USB: serial: Add Option GTM681W to qcserial device table Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 076/134] USB: spcp8x5: fix device initialisation at open Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 077/134] USB: pl2303: " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 078/134] USB: mos7840: fix memory leak in open Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 079/134] USB: mos7840: fix race in register handling Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 080/134] USB: adutux: fix big-endian device-type reporting Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 081/134] USB: ti_usb_3410_5052: fix big-endian firmware handling Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 082/134] USB: keyspan: fix null-deref at disconnect and release Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 083/134] USB: OHCI: Allow runtime PM without system sleep Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 084/134] USB: fix build error when CONFIG_PM_SLEEP isnt enabled Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 085/134] USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 086/134] usb: Disable USB 2.0 Link PM before device reset Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 087/134] usb: dwc3: pci: add support for BayTrail Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 088/134] usb: dwc3: add support for Merrifield Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 089/134] usb: wusbcore: set the RPIPE wMaxPacketSize value correctly Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 090/134] usb: wusbcore: change WA_SEGS_MAX to a legal value Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 091/134] USB: ftdi_sio: fixed handling of unsupported CSIZE setting Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 092/134] ahci: Add Device IDs for Intel Wellsburg PCH Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 093/134] ahci: AHCI-mode SATA patch for Intel Coleto Creek DeviceIDs Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 094/134] xhci: Dont enable/disable RWE on bus suspend/resume Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 095/134] ahci: Add Device IDs for Intel Wildcat Point-LP Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 096/134] usb: hub: Clear Port Reset Change during init/resume Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 097/134] xhci: quirk for extra long delay for S4 Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 098/134] xhci: Fix spurious wakeups after S5 on Haswell Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 099/134] xhci: Limit the spurious wakeup fix only to HP machines Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 100/134] ALSA: hda - Cache the MUX selection for generic HDMI Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 101/134] ALSA: hda - Add new GPU codec ID to snd-hda Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 102/134] ALSA: hda - Add another " Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 103/134] ALSA: usb-audio: skip UAC2 EFFECT_UNIT Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 104/134] ALSA: usb: Parse UAC2 extension unit like for UAC1 Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 105/134] ALSA: ak4xx-adda: info leak in ak4xxx_capture_source_info() Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 106/134] ALSA: 6fire: fix DMA issues with URB transfer_buffer usage Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 107/134] ALSA: 6fire: make buffers DMA-able (pcm) Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 108/134] ALSA: 6fire: make buffers DMA-able (midi) Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 109/134] ALSA: hda - hdmi: Fallback to ALSA allocation when selecting CA Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 110/134] ALSA: pcsp: Fix the order of input device unregistration Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 111/134] ALSA: hda/realtek - Add support of ALC231 codec Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 112/134] hwmon: (coretemp) Improve support of recent Atom CPU models Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 113/134] hwmon: (coretemp) Add support for Atom D2000 and N2000 series " Greg Kroah-Hartman
2014-04-10 3:23 ` Greg Kroah-Hartman [this message]
2014-04-10 3:23 ` [PATCH 3.4 115/134] hwmon: (coretemp) Add support for Atom CE4110/4150/4170 Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 116/134] hwmon: (applesmc) Always read until end of data Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 117/134] hwmon: Prevent some divide by zeros in FAN_TO_REG() Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 118/134] tg3: Add New 5719 Read DMA workaround Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 119/134] tg3: Wait for boot code to finish after power on Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 120/134] OMAPFB: fix framebuffer console colors Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 121/134] mmc: mxs-mmc: fix deadlock caused by recursion loop Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 122/134] sb_edac: Avoid overflow errors at memory size calculation Greg Kroah-Hartman
2014-04-10 3:23 ` [PATCH 3.4 123/134] tg3: Skip powering down function 0 on certain serdes devices Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 124/134] tg3: Add read dma workaround for 5720 Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 125/134] media: gspca_kinect: add Kinect for Windows USB id Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 126/134] media: v4l: Reset subdev v4l2_dev field to NULL if registration fails Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 127/134] media: omap_vout: find_vma() needs ->mmap_sem held Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 128/134] media: dmxdev: remove dvb_ringbuffer_flush() on writer side Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 129/134] media: hdpvr: register the video node at the end of probe Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 130/134] media: hdpvr: fix iteration over uninitialized lists in hdpvr_probe() Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 131/134] media: saa7164: fix return value check in saa7164_initdev() Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 132/134] powernow-k6: disable cache when changing frequency Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 133/134] powernow-k6: correctly initialize default parameters Greg Kroah-Hartman
2014-04-10 3:24 ` [PATCH 3.4 134/134] powernow-k6: reorder frequencies Greg Kroah-Hartman
2014-04-10 8:31 ` [PATCH 3.4 000/134] 3.4.87-stable review Guenter Roeck
2014-04-10 16:01 ` Greg Kroah-Hartman
2014-04-10 19:56 ` Shuah Khan
2014-04-10 20:03 ` Greg Kroah-Hartman
2014-04-12 1:01 ` Satoru Takeuchi
2014-04-12 1:59 ` Greg Kroah-Hartman
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=20140410032314.005473908@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=h.huangqiang@huawei.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).