Skip to contentSkip to conversation

x86/hwmon for 2.6.36

GIT PULL H. Peter Anvin 1 participant 1 message Aug 5, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

[ This topic needs to be merged after x86/cpu ]

Hi Linus,

The following changes since commit 9792db6174d9927700ed288e6d74b9391bf785d1:

x86, cpu: Package Level Thermal Control, Power Limit Notification definitions (2010-07-30 16:15:32 -0700)

are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-hwmon-for-linus

Fenghua Yu (4):
x86, hwmon: Package Level Thermal/Power: pkgtemp hwmon driver x86, hwmon: Package Level Thermal/Power: thermal throttling handler x86, hwmon: Package Level Thermal/Power: power limit x86, hwmon: Package Level Thermal/Power: pkgtemp documentation

 Documentation/hwmon/pkgtemp              |   36 +++
 arch/x86/configs/i386_defconfig          |    1 +
 arch/x86/configs/x86_64_defconfig        |    1 +
 arch/x86/kernel/cpu/mcheck/therm_throt.c |  206 +++++++++++---
 drivers/hwmon/Kconfig                    |    7 +
 drivers/hwmon/Makefile                   |    1 +
 drivers/hwmon/pkgtemp.c                  |  456 ++++++++++++++++++++++++++++++
 7 files changed, 669 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/hwmon/pkgtemp
 create mode 100644 drivers/hwmon/pkgtemp.c
Documentation/hwmon/pkgtemp new file +36 -0
new file mode 100644
index 0000000..c8e1fb0
@@ -0,0 +1,36 @@
+Kernel driver pkgtemp
+======================
+
+Supported chips:
+  * Intel family
+    Prefix: 'pkgtemp'
+    CPUID:
+    Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
+               Volume 3A: System Programming Guide
+
+Author: Fenghua Yu
+
+Description
+-----------
+
+This driver permits reading package level temperature sensor embedded inside
+Intel CPU package. The sensors can be in core, uncore, memory controller, or
+other components in a package. The feature is first implemented in Intel Sandy
+Bridge platform.
+
+Temperature is measured in degrees Celsius and measurement resolution is
+1 degree C. Valid temperatures are from 0 to TjMax degrees C, because the actual
+value of temperature register is in fact a delta from TjMax.
+
+Temperature known as TjMax is the maximum junction temperature of package.
+We get this from MSR_IA32_TEMPERATURE_TARGET. If the MSR is not accessible,
+we define TjMax as 100 degrees Celsius. At this temperature, protection
+mechanism will perform actions to forcibly cool down the package. Alarm
+may be raised, if the temperature grows enough (more than TjMax) to trigger
+the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
+
+temp1_input	  - Package temperature (in millidegrees Celsius).
+temp1_max        - All cooling devices should be turned on.
+temp1_crit	  - Maximum junction temperature (in millidegrees Celsius).
+temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
+		    Correct CPU operation is no longer guaranteed.
arch/x86/configs/i386_defconfig +1 -0
index d28fad1..e3a3243 100644
@@ -1471,6 +1471,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_CORETEMP is not set
+# CONFIG_SENSORS_PKGTEMP is not set
 # CONFIG_SENSORS_IT87 is not set
 # CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
arch/x86/configs/x86_64_defconfig +1 -0
index 6c86acd..4251f83 100644
@@ -1456,6 +1456,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_CORETEMP is not set
+# CONFIG_SENSORS_PKGTEMP is not set
 # CONFIG_SENSORS_IT87 is not set
 # CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
arch/x86/kernel/cpu/mcheck/therm_throt.c +167 -39

297 lines not on this page · raw message

drivers/hwmon/Kconfig +7 -0
index e19cf8e..3a858e8 100644
@@ -407,6 +407,13 @@ config SENSORS_CORETEMP
 	  sensor inside your CPU. Most of the family 6 CPUs
 	  are supported. Check documentation/driver for details.
 
+config SENSORS_PKGTEMP
+	tristate "Intel processor package temperature sensor"
+	depends on X86 && PCI && EXPERIMENTAL
+	help
+	  If you say yes here you get support for the package level temperature
+	  sensor inside your CPU. Check documentation/driver for details.
+
 config SENSORS_IBMAEM
 	tristate "IBM Active Energy Manager temperature/power sensors and control"
 	select IPMI_SI
drivers/hwmon/Makefile +1 -0
index 2138ceb..879814e 100644
@@ -39,6 +39,7 @@ obj-$(CONFIG_SENSORS_AMS)	+= ams/
 obj-$(CONFIG_SENSORS_ASC7621)	+= asc7621.o
 obj-$(CONFIG_SENSORS_ATXP1)	+= atxp1.o
 obj-$(CONFIG_SENSORS_CORETEMP)	+= coretemp.o
+obj-$(CONFIG_SENSORS_PKGTEMP)	+= pkgtemp.o
 obj-$(CONFIG_SENSORS_DME1737)	+= dme1737.o
 obj-$(CONFIG_SENSORS_DS1621)	+= ds1621.o
 obj-$(CONFIG_SENSORS_EMC1403)	+= emc1403.o
drivers/hwmon/pkgtemp.c new file +456 -0

456 lines not on this page · raw message