<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/hwmon/coretemp.c, branch v3.2-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>hwmon: (coretemp) Fix for non-SMP builds</title>
<updated>2011-11-06T19:25:18+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-11-06T19:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2aba6cac2a84f3b80e11a680c34d55e7739b474d'/>
<id>2aba6cac2a84f3b80e11a680c34d55e7739b474d</id>
<content type='text'>
The definition of TO_ATTR_NO in the non-SMP case is wrong. As the SMP
definition resolves to the correct value, just use this for both
cases.

Without this fix the temperature attributes are named temp0_* instead
of temp2_*, so libsensors won't pick them. Broken since kernel 3.0.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Tested-by: Phil Sutter &lt;phil@nwl.cc&gt;
Cc: stable@kernel.org
Acked-by: Durgadoss R &lt;Durgadoss.r@intel.com&gt;
Acked-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The definition of TO_ATTR_NO in the non-SMP case is wrong. As the SMP
definition resolves to the correct value, just use this for both
cases.

Without this fix the temperature attributes are named temp0_* instead
of temp2_*, so libsensors won't pick them. Broken since kernel 3.0.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Tested-by: Phil Sutter &lt;phil@nwl.cc&gt;
Cc: stable@kernel.org
Acked-by: Durgadoss R &lt;Durgadoss.r@intel.com&gt;
Acked-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>coretemp: Get microcode revision from cpu_data</title>
<updated>2011-10-14T11:16:42+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2011-10-13T00:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ca8bc8dc044793ee4d59ff7fe40138eee27d0325'/>
<id>ca8bc8dc044793ee4d59ff7fe40138eee27d0325</id>
<content type='text'>
Now that the ucode revision is available in cpu_data remove
the existing code in coretemp.c to query it manually. Read the
ucode revision from cpu_data instead

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: jbeulich@novell.com
Cc: fenghua.yu@intel.com
Cc: khali@linux-fr.org
Link: http://lkml.kernel.org/r/1318466795-7393-3-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the ucode revision is available in cpu_data remove
the existing code in coretemp.c to query it manually. Read the
ucode revision from cpu_data instead

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: jbeulich@novell.com
Cc: fenghua.yu@intel.com
Cc: khali@linux-fr.org
Link: http://lkml.kernel.org/r/1318466795-7393-3-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Avoid leaving around dangling pointer</title>
<updated>2011-09-28T15:19:21+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>guenter.roeck@ericsson.com</email>
</author>
<published>2011-09-24T22:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=20ecb499f64a7e8e7fe03f6098ab25c71b7a6481'/>
<id>20ecb499f64a7e8e7fe03f6098ab25c71b7a6481</id>
<content type='text'>
Storing the struct temp_data pointer allocated from create_core_data()
when returning an error has the potential of leaving around a pointer
to freed memory. Reset it to NULL for error returns.

Reported-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Storing the struct temp_data pointer allocated from create_core_data()
when returning an error has the potential of leaving around a pointer
to freed memory. Reset it to NULL for error returns.

Reported-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Fixup platform device ID change</title>
<updated>2011-09-28T15:19:20+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-09-28T15:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0eb9782ad9b1bd496ba61cd5ea27ccb8db21e885'/>
<id>0eb9782ad9b1bd496ba61cd5ea27ccb8db21e885</id>
<content type='text'>
With recent change "hwmon: (coretemp) don't use kernel assigned CPU
number as platform device ID", the microcode check is now running on
random CPU. Fix that by checking the microcode before creating the
platform device rather than at probe time.

Also avoid calling TO_PHYS_ID(cpu) twice in the same function, it's
expensive.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With recent change "hwmon: (coretemp) don't use kernel assigned CPU
number as platform device ID", the microcode check is now running on
random CPU. Fix that by checking the microcode before creating the
platform device rather than at probe time.

Also avoid calling TO_PHYS_ID(cpu) twice in the same function, it's
expensive.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) remove struct platform_data * parameter from create_core_data()</title>
<updated>2011-09-23T17:39:11+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2011-09-23T10:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2f1c3db0a6adcfd12d556afa3605d4923658b307'/>
<id>2f1c3db0a6adcfd12d556afa3605d4923658b307</id>
<content type='text'>
The only caller of the function obtained the pointer solely for the
purpose of passing it to this function, while it can be easily
determined from the struct platform_device * parameter also passed.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only caller of the function obtained the pointer solely for the
purpose of passing it to this function, while it can be easily
determined from the struct platform_device * parameter also passed.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) constify static data</title>
<updated>2011-09-23T17:39:10+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2011-09-23T10:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e3204ed3a4a78ca4d10eee8b661b94429bd38da8'/>
<id>e3204ed3a4a78ca4d10eee8b661b94429bd38da8</id>
<content type='text'>
These arrays won't ever be written to, so protect them from
unintentional modification.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These arrays won't ever be written to, so protect them from
unintentional modification.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) don't use kernel assigned CPU number as platform device ID</title>
<updated>2011-09-23T17:38:09+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2011-09-23T10:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b3a242a6e4b8c09dbb466ab7a9d2c724e75faa67'/>
<id>b3a242a6e4b8c09dbb466ab7a9d2c724e75faa67</id>
<content type='text'>
... as that has the potential to conflict with (particularly soft) CPU
hot removal and re-adding.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
[guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... as that has the potential to conflict with (particularly soft) CPU
hot removal and re-adding.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
[guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Don't use threshold registers for tempX_max</title>
<updated>2011-09-22T00:25:18+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>guenter.roeck@ericsson.com</email>
</author>
<published>2011-09-20T04:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f4af6fd6e21792ca4deca3d29c113a575594078e'/>
<id>f4af6fd6e21792ca4deca3d29c113a575594078e</id>
<content type='text'>
With commit c814a4c7c4aad795835583344353963a0a673eb0, the meaning of tempX_max
was changed. It no longer returns the value of bits 8:15 of
MSR_IA32_TEMPERATURE_TARGET, but instead returns the value of CPU threshold
register T1. tempX_max_hyst was added to reflect the value of temperature
threshold register T0.

As it turns out, T0 and T1 are used on some systems, presumably by the BIOS.
Also, T0 and T1 don't have a well defined meaning. The thresholds may be used
as upper or lower limits, and it is not guaranteed that T0 &lt;= T1. Thus, the new
attribute mapping does not reflect the actual usage of the threshold registers.
Also, register contents are changed during runtime by an entity other than the
hwmon driver, meaning the values cached by the driver do not reflect actual
register contents.

Revert most of c814a4c7c4aad795835583344353963a0a673eb0 to address the problem.
Support for T0 and T1 will be added back in with a separate commit, using new
attribute names.

Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With commit c814a4c7c4aad795835583344353963a0a673eb0, the meaning of tempX_max
was changed. It no longer returns the value of bits 8:15 of
MSR_IA32_TEMPERATURE_TARGET, but instead returns the value of CPU threshold
register T1. tempX_max_hyst was added to reflect the value of temperature
threshold register T0.

As it turns out, T0 and T1 are used on some systems, presumably by the BIOS.
Also, T0 and T1 don't have a well defined meaning. The thresholds may be used
as upper or lower limits, and it is not guaranteed that T0 &lt;= T1. Thus, the new
attribute mapping does not reflect the actual usage of the threshold registers.
Also, register contents are changed during runtime by an entity other than the
hwmon driver, meaning the values cached by the driver do not reflect actual
register contents.

Revert most of c814a4c7c4aad795835583344353963a0a673eb0 to address the problem.
Support for T0 and T1 will be added back in with a separate commit, using new
attribute names.

Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Let the user force TjMax</title>
<updated>2011-09-22T00:25:18+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-09-16T19:24:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a45a8c8571c0be6a6bd72ae5a14255c26b14b504'/>
<id>a45a8c8571c0be6a6bd72ae5a14255c26b14b504</id>
<content type='text'>
On old CPUs (and even some recent Atom CPUs) TjMax can't be read from
the CPU registers, so it is guessed by the driver using a complex
heuristic which isn't reliable. So let users who know their CPU's
TjMax pass it as a module parameter.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: "R, Durgadoss" &lt;durgadoss.r@intel.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Acked-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On old CPUs (and even some recent Atom CPUs) TjMax can't be read from
the CPU registers, so it is guessed by the driver using a complex
heuristic which isn't reliable. So let users who know their CPU's
TjMax pass it as a module parameter.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: "R, Durgadoss" &lt;durgadoss.r@intel.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Acked-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Drop duplicate function get_pkg_tjmax</title>
<updated>2011-09-22T00:25:18+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-09-16T19:21:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6bf9e9b09c3abb5447bbbf16c2d0cbe721e44f3f'/>
<id>6bf9e9b09c3abb5447bbbf16c2d0cbe721e44f3f</id>
<content type='text'>
Function get_pkg_tjmax is a simplified copy of get_tjmax. Drop it and
always use get_tjmax, result is the same and this avoids code
duplication.

Also make get_tjmax less verbose: don't warn about MSR read failure
when failure was expected, and don't report TjMax in the logs unless
debugging is enabled.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Acked-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function get_pkg_tjmax is a simplified copy of get_tjmax. Drop it and
always use get_tjmax, result is the same and this avoids code
duplication.

Also make get_tjmax less verbose: don't warn about MSR read failure
when failure was expected, and don't report TjMax in the logs unless
debugging is enabled.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Acked-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
