Patch for amdtemp

From: Mario Lobo <mlobo_at_digiart.art.br>
Date: Fri, 30 Oct 2009 22:26:12 -0300
Hi;

Recently I bought a Phenom II quad and I noticed that amdtemp.ko only 
displayed 2 temp sysctl values. I started digging the net for some clues and I 
found a patch from a guy (sorry, don't remember his name any longer) that 
changed amdtemp for his 3 core amd cpu.

I expanded HIS idea to 4 cores and it worked fine, so I'm submitting the patch 
for testing by other members.

[~]>sysctl -a | grep temp
hw.usb.template: 0
dev.amdtemp.0.%desc: AMD K8 Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.cpu.0.temperature: 48.0C
dev.cpu.1.temperature: 48.0C
dev.cpu.2.temperature: 48.0C
dev.cpu.3.temperature: 47.8C

Since I know before hand how many cores my cpu has, I changed the code for the 
exact amount of cores but maybe there is a way to detect how many cores the 
CPU has before creating the sysctl variables.

BW
-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winedows FREE)

Received on Sat Oct 31 2009 - 00:26:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC