<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwmon/k8temp.c, branch v3.6.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwmon: (k8temp) Convert to use devm_ functions</title>
<updated>2012-07-22T04:48:43+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2012-06-02T19:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a0d44cbcc0b92d1dbec5dda3a5b7ea929c05d522'/>
<id>a0d44cbcc0b92d1dbec5dda3a5b7ea929c05d522</id>
<content type='text'>
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: use module_pci_driver</title>
<updated>2012-05-21T02:41:48+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-04-03T01:25:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f71f5a550a43a81943efbe0032190ec381006b53'/>
<id>f71f5a550a43a81943efbe0032190ec381006b53</id>
<content type='text'>
This patch converts the drivers in drivers/hwmon/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Cc: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&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>
This patch converts the drivers in drivers/hwmon/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Cc: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k8temp) fix checkpatch issues</title>
<updated>2012-03-19T01:26:42+00:00</updated>
<author>
<name>Frans Meulenbroeks</name>
<email>fransmeulenbroeks@gmail.com</email>
</author>
<published>2012-01-10T22:01:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=93092a644fb519ec520c3a1f3e05ef9d25b1dac4'/>
<id>93092a644fb519ec520c3a1f3e05ef9d25b1dac4</id>
<content type='text'>
resolved:
WARNING: line over 80 characters
ERROR: do not use assignment in if condition

Signed-off-by: Frans Meulenbroeks &lt;fransmeulenbroeks@gmail.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>
resolved:
WARNING: line over 80 characters
ERROR: do not use assignment in if condition

Signed-off-by: Frans Meulenbroeks &lt;fransmeulenbroeks@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: use DEFINE_PCI_DEVICE_TABLE</title>
<updated>2012-03-19T01:26:29+00:00</updated>
<author>
<name>Frans Meulenbroeks</name>
<email>fransmeulenbroeks@gmail.com</email>
</author>
<published>2012-01-05T18:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=600151b9de97bd580f9dc09199a10f0c2b65cb97'/>
<id>600151b9de97bd580f9dc09199a10f0c2b65cb97</id>
<content type='text'>
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE

Signed-off-by: Frans Meulenbroeks &lt;fransmeulenbroeks@gmail.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>
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE

Signed-off-by: Frans Meulenbroeks &lt;fransmeulenbroeks@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: Use helper functions to set and get driver data</title>
<updated>2011-05-25T18:43:31+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-05-25T18:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95de3b257516d21af6e0313c7bab119e4f80d6f4'/>
<id>95de3b257516d21af6e0313c7bab119e4f80d6f4</id>
<content type='text'>
Use helper functions to set and get driver data. This is more elegant.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Andreas Herrmann &lt;andreas.herrmann3@amd.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>
Use helper functions to set and get driver data. This is more elegant.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Acked-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k8temp) Remove superfluous CPU family check</title>
<updated>2010-10-28T18:31:42+00:00</updated>
<author>
<name>Andreas Herrmann</name>
<email>andreas.herrmann3@amd.com</email>
</author>
<published>2010-10-28T18:31:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=628b4504cf69fbe262b41c16a4a3fd61b091d61c'/>
<id>628b4504cf69fbe262b41c16a4a3fd61b091d61c</id>
<content type='text'>
The family check in k8temp is not required because the driver is
already bound to a northbridge device only used with K8 CPUs.

Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The family check in k8temp is not required because the driver is
already bound to a northbridge device only used with K8 CPUs.

Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k8temp) Differentiate between AM2 and ASB1</title>
<updated>2010-08-25T13:42:12+00:00</updated>
<author>
<name>Andreas Herrmann</name>
<email>andreas.herrmann3@amd.com</email>
</author>
<published>2010-08-25T13:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a05e93f3b3fc2f53c1d0de3b17019e207c482349'/>
<id>a05e93f3b3fc2f53c1d0de3b17019e207c482349</id>
<content type='text'>
Commit 8bf0223ed515be24de0c671eedaff49e78bebc9c (hwmon, k8temp: Fix
temperature reporting for ASB1 processor revisions) fixed temperature
reporting for ASB1 CPUs. But those CPU models (model 0x6b, 0x6f, 0x7f)
were packaged both as AM2 (desktop) and ASB1 (mobile). Thus the commit
leads to wrong temperature reporting for AM2 CPU parts.

The solution is to determine the package type for models 0x6b, 0x6f,
0x7f.

This is done using BrandId from CPUID Fn8000_0001_EBX[15:0]. See
"Constructing the processor Name String" in "Revision Guide for AMD
NPT Family 0Fh Processors" (Rev. 3.46).

Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Cc: stable@kernel.org [.32.x, .33.x, .34.x, .35.x]
Reported-by: Vladislav Guberinic &lt;neosisani@gmail.com&gt;
Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 8bf0223ed515be24de0c671eedaff49e78bebc9c (hwmon, k8temp: Fix
temperature reporting for ASB1 processor revisions) fixed temperature
reporting for ASB1 CPUs. But those CPU models (model 0x6b, 0x6f, 0x7f)
were packaged both as AM2 (desktop) and ASB1 (mobile). Thus the commit
leads to wrong temperature reporting for AM2 CPU parts.

The solution is to determine the package type for models 0x6b, 0x6f,
0x7f.

This is done using BrandId from CPUID Fn8000_0001_EBX[15:0]. See
"Constructing the processor Name String" in "Revision Guide for AMD
NPT Family 0Fh Processors" (Rev. 3.46).

Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Cc: stable@kernel.org [.32.x, .33.x, .34.x, .35.x]
Reported-by: Vladislav Guberinic &lt;neosisani@gmail.com&gt;
Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k8temp) Adjust confusing if indentation</title>
<updated>2010-08-14T19:08:47+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2010-08-14T19:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df149d02ea8ee49cd14c6609cc7ef980d62dce80'/>
<id>df149d02ea8ee49cd14c6609cc7ef980d62dce80</id>
<content type='text'>
Move the if(err) statement after the if into the if branch indicated by its
indentation.  The preceding if(err) test implies that err cannot be nonzero
unless the if branch is taken.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable braces5@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 &lt;&lt; r.p1;
p2 &lt;&lt; r.p2;
@@

if (p1[0].column == p2[0].column):
 cocci.print_main("branch",p4)
 cocci.print_secs("after",p5)
// &lt;/smpl&gt;  

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the if(err) statement after the if into the if branch indicated by its
indentation.  The preceding if(err) test implies that err cannot be nonzero
unless the if branch is taken.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable braces5@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 &lt;&lt; r.p1;
p2 &lt;&lt; r.p2;
@@

if (p1[0].column == p2[0].column):
 cocci.print_main("branch",p4)
 cocci.print_secs("after",p5)
// &lt;/smpl&gt;  

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions</title>
<updated>2010-07-09T14:22:47+00:00</updated>
<author>
<name>Andreas Herrmann</name>
<email>andreas.herrmann3@amd.com</email>
</author>
<published>2010-07-09T14:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d535bad90dad4eb42ec6528043fcfb53627d4f89'/>
<id>d535bad90dad4eb42ec6528043fcfb53627d4f89</id>
<content type='text'>
Reported temperature for ASB1 CPUs is too high.
Add ASB1 CPU revisions (these are also non-desktop variants) to the
list of CPUs for which the temperature fixup is not required.

Example: (from LENOVO ThinkPad Edge 13, 01972NG, system was idle)

  Current kernel reports

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +74.0 C
  Core0 Temp:  +70.0 C
  Core1 Temp:  +69.0 C
  Core1 Temp:  +70.0 C

  With this patch I have

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +54.0 C
  Core0 Temp:  +51.0 C
  Core1 Temp:  +48.0 C
  Core1 Temp:  +49.0 C

Cc: stable@kernel.org [.32.x .33.x, .34.x]
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported temperature for ASB1 CPUs is too high.
Add ASB1 CPU revisions (these are also non-desktop variants) to the
list of CPUs for which the temperature fixup is not required.

Example: (from LENOVO ThinkPad Edge 13, 01972NG, system was idle)

  Current kernel reports

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +74.0 C
  Core0 Temp:  +70.0 C
  Core1 Temp:  +69.0 C
  Core1 Temp:  +70.0 C

  With this patch I have

  $ sensors
  k8temp-pci-00c3
  Adapter: PCI adapter
  Core0 Temp:  +54.0 C
  Core0 Temp:  +51.0 C
  Core1 Temp:  +48.0 C
  Core1 Temp:  +49.0 C

Cc: stable@kernel.org [.32.x .33.x, .34.x]
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k8temp) Bypass core swapping on single-core processors</title>
<updated>2010-06-20T07:22:32+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2010-06-20T07:22:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cd4de21f7e65a8cd04860f5661b3c18648ee52a1'/>
<id>cd4de21f7e65a8cd04860f5661b3c18648ee52a1</id>
<content type='text'>
Commit a2e066bba2aad6583e3ff648bf28339d6c9f0898 introduced core
swapping for CPU models 64 and later. I recently had a report about
a Sempron 3200+, model 95, for which this patch broke temperature
reading. It happens that this is a single-core processor, so the
effect of the swapping was to read a temperature value for a core
that didn't exist, leading to an incorrect value (-49 degrees C.)

Disabling core swapping on singe-core processors should fix this.

Additional comment from Andreas:

The BKDG says

  Thermal Sensor Core Select (ThermSenseCoreSel)-Bit 2. This bit
  selects the CPU whose temperature is reported in the CurTemp
  field. This bit only applies to dual core processors. For
  single core processors CPU0 Thermal Sensor is always selected.

k8temp_probe() correctly detected that SEL_CORE can't be used on single
core CPU. Thus k8temp did never update the temperature values stored
in temp[1][x] and -49 degrees was reported. For single core CPUs we
must use the values read into temp[0][x].

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Tested-by: Rick Moritz &lt;rhavin@gmx.net&gt;
Acked-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit a2e066bba2aad6583e3ff648bf28339d6c9f0898 introduced core
swapping for CPU models 64 and later. I recently had a report about
a Sempron 3200+, model 95, for which this patch broke temperature
reading. It happens that this is a single-core processor, so the
effect of the swapping was to read a temperature value for a core
that didn't exist, leading to an incorrect value (-49 degrees C.)

Disabling core swapping on singe-core processors should fix this.

Additional comment from Andreas:

The BKDG says

  Thermal Sensor Core Select (ThermSenseCoreSel)-Bit 2. This bit
  selects the CPU whose temperature is reported in the CurTemp
  field. This bit only applies to dual core processors. For
  single core processors CPU0 Thermal Sensor is always selected.

k8temp_probe() correctly detected that SEL_CORE can't be used on single
core CPU. Thus k8temp did never update the temperature values stored
in temp[1][x] and -49 degrees was reported. For single core CPUs we
must use the values read into temp[0][x].

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Tested-by: Rick Moritz &lt;rhavin@gmx.net&gt;
Acked-by: Andreas Herrmann &lt;andreas.herrmann3@amd.com&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
</feed>
