temp.c and cputable.c issues
hi folks!,
i'm running the last stable kernel tree with benh r1 patches (2.6.1-r1 under gentoo).
i've enabled TAU and CPUFREQ, and compiled everything...all seems to go well, but looking into a dmesg from kernel i'm receiving this message:
...
Thermal assist unit not available
...
looking into /usr/src/linux/arch/ppc/kernel/cputable.c i've noticed that all 7455 based machine, have the CPU_FTR_TAU feature disabled, so i've patched the file as in the included patch...now all seems to works fine!.
cputemperature is shown in /proc/cpuinfo, and all the infos seems to be good calibrated and really near to real-world values.
Actually, i'm writing a dockapp for wm, and i've noticed some troubles in temperature; after put my cpu to low-power with an:
'echo -n "0:600000:600000:performance" > /proc/cpufreq'
the value temperature in /proc/cpuinfo start to grow-up with NOSENSE...seems that every 1sec-tick, the temperature value (both high and low) increment of 1 unit...at 68°-69° stop is race and the value remain at this point with further changes; no matter if the cpuload is 0% or 100%...the value is completely stalled.
If i restore the cpu to high-power with an:
'echo -n "0:900000:900000:performance" > /proc/cpufreq'
the temperature in /proc/cpuinfo start to grow down, and the values returns to be correctly and with a real-life attinency.
Looking into sources under /usr/src/linux/arch/ppc/kernel/temp.c, i've investigated around the lines concerning the TAU_update, and seems that the double-if above:
...
if((thrm = mfspr(SPRN_THRM2)) & THRM1_TIV){ /* is valid? */
if(thrm & THRM1_TIN){ /* crossed high threshold */
...
after switching down the cpu-freq, is every true!
I think that the problem is in interrupts enabling/disabling during the 'cpu_set_speed' function into pmac_cpufreq.c, but i've no ideas on howto check it...perhaps some guru, can give a more comprensive answer.
any suggests/comments, are welcome,
regards
--
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available ] [ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE E422 076A 2561 1D67 B4DD ] [ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 2 lines · Tom Rini
There are errata documents from Motorola that tell you not to use the TAU on any 745x CPU. The omission of this flag is intentional.
what's about this documents ?, if TAU is disabled what's the right way to fetch thermal infos for 745x based CPUs ?, any workaround or suggested url to start from ?
regards
--
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available ] [ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE E422 076A 2561 1D67 B4DD ] [ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 10 lines · valvoline
i've enabled TAU and CPUFREQ, and compiled everything...all seems to go well, but looking into a dmesg from kernel i'm receiving this message:
...
Thermal assist unit not available
...looking into
/usr/src/linux/arch/ppc/kernel/cputable.ci've noticed that all 7455 based machine, have theCPU_FTR_TAUfeature disabled, so i've patched the file as in the included patch...now all seems to works fine!.
There are errata documents from Motorola that tell you not to use the TAU on any 745x CPU. The omission of this flag is intentional.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 8 lines · valvoline
Quoted 2 lines · Tom Rini
There are errata documents from Motorola that tell you not to use the TAU on any 745x CPU. The omission of this flag is intentional.
what's about this documents ?, if TAU is disabled what's the right way to fetch thermal infos for 745x based CPUs ?, any workaround or suggested url to start from ?
There are no workarounds or planned fixes for this errata (it varries slightly in number from 7450/1 to 7455 to 7457 documents I think). All errata can be gotten from Motorolas website.
7450:
http://e-www.motorola.com/webapp/sps/site/prod_summary.jsp?code=MPC7450_ARCHIVED
7451:
http://e-www.motorola.com/webapp/sps/site/prod_summary.jsp?code=MPC7451
7455:
http://e-www.motorola.com/webapp/sps/site/prod_summary.jsp?code=MPC7455
7457:
http://e-www.motorola.com/webapp/sps/site/prod_summary.jsp?code=MPC7457
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 3 lines · Colin Leroy
What's your computer model ?
You can try to do afind /proc/device-tree -name fan|grep -v aliases
i've an ibook G4/12". it's branded as PowerMac6,3. It should be the lastest model available from apple.
Quoted 2 lines
You may have an external chipset used to check temperatures and control the fan.
sure. there's an external chipset for temperature and fan control. Under Macos X, i've set and get values from it several times...but what about linux ?
--
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available ] [ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE E422 076A 2561 1D67 B4DD ] [ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 2 lines · Colin Leroy
You may have an external chipset used to check temperatures and control the fan.
to be exact, there's an i2c thermostat named adt7467:
http://www.analog.com/UploadedFiles/Data_Sheets/115254175ADT7467_pra.pdf
i've tried to use it, but the module is not compatible with i2c_west and soundcard, so the system hangs with no further response! (=
without the soundcards, the module load correctly, but i can't see any new special device under /dev nor /proc...perhaps, the support is stille experimental, or i've done some mistake in loading.
--
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available ] [ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE E422 076A 2561 1D67 B4DD ] [ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 3 lines · Colin Leroy
What's your computer model ?
You can try to do afind /proc/device-tree -name fan|grep -v aliases
i've an iBook G4/12"/firewire. it's branded as PowerMac6,3 and it should be the lastest available from apple.
--
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available ] [ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE E422 076A 2561 1D67 B4DD ] [ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 8 lines · Tom Rini
Quoted 3 lines
There are errata documents from Motorola that tell you not to use the TAU on any 745x CPU. The omission of this flag is intentional.
what's about this documents ?, if TAU is disabled what's the right way to fetch thermal infos for 745x based CPUs ?, any workaround or
suggested
Quoted 1 line
url to start from ?
What's your computer model ?
You can try to do afind /proc/device-tree -name fan|grep -v aliases
You may have an external chipset used to check temperatures and control the fan.
--
Colin
Ne disez pas disez, mais disez dites
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Hi again,
Quoted 2 lines
i've tried to use it, but the module is not compatible with
i2c_westand soundcard, so the system hangs with no further response! (=
It works fine for me. What modules do you have ?
For me it is
therm_adt7467 9924 0 snd_pcm_oss 69188 0 snd_mixer_oss 22464 2 snd_pcm_oss i2c_keywest 13320 0 snd_powermac 46020 1 snd_pcm 122708 2 snd_pcm_oss,snd_powermac snd_page_alloc 13956 1 snd_pcm snd_timer 28608 1 snd_pcm snd 61476 5 snd_pcm_oss,snd_mixer_oss,snd_powermac,snd_pcm,snd_timer soundcore 11232 2 snd i2c_core 29540 3 therm_adt7467,i2c_keywest,snd_powermac
They're loaded in this order:
snd-powermac
snd-pcm-osstherm_adt7467
But the other way works too.
--
Colin
Ne disez pas disez, mais disez dites
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 4 lines · Colin Leroy
They're loaded in this order:
snd-powermac
snd-pcm-osstherm_adt7467
i gotta it! :)
for some strange reason i need to modprobe manually the i2c_west, first of all...next if i modprobe:
snd-powermac
snd-pcm-osstherm_adt7467
all works fine!. again, if therm_adt7467 is loaded first all the system hangs with no further response if i try to modprobe something related to i2c_west...maybe some kind of lock ?
under /var/log/everything.log, now, i can read the reports about temperatures but no /dev/ devices is created; of course, i've modprobed i2c_dev, but without any success...
regards.
--
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available ] [ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE E422 076A 2561 1D67 B4DD ] [ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 3 lines
i gotta it! :)
for some strange reason i need to modprobe manually thei2c_west, first of all...next if i modprobe:
Can you try the attached patch (apply against drivers/macintosh/therm_adt7467.c).
Then, try to modprobe therm_adt7467 without i2c-core and i2c-keywest loaded.
Tell me if this works.
Thanks,
--
Colin
Ne disez pas disez, mais disez dites
therm_adt7467.c renamed from therm_adt7467.c.orig +4 -0
@@ -27,6 +27,7 @@#include <asm/system.h> #include <asm/sections.h> #include <asm/of_device.h> +#include <linux/kmod.h> #undef DEBUG
@@ -421,6 +422,9 @@device_create_file (&of_dev->dev, &dev_attr_gpu_limit);device_create_file (&of_dev->dev, &dev_attr_fan_speed); +#ifdef CONFIG_KMOD +request_module ("i2c-keywest" ); +#endif return i2c_add_driver (&thermostat_driver); }
Quoted 10 lines · Colin Leroy
Quoted 3 lines
i gotta it! :)
for some strange reason i need to modprobe manually thei2c_west, first of all...next if i modprobe:Can you try the attached patch (apply against
drivers/macintosh/therm_adt7467.c).
Then, try to modprobetherm_adt7467without i2c-core and i2c-keywest loaded.Tell me if this works.
If you look at <linux/kmod.h>, you'll notice your patch won't work, since request_module() is a dummy if CONFIG_KMOD is not set.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
On 16 Jan 2004 at 12h01, Geert Uytterhoeven wrote:
Hi,
Quoted 2 lines
If you look at <
linux/kmod.h>, you'll notice your patch won't work, sincerequest_module()is a dummy ifCONFIG_KMODis not set.
Well, it'll work for the majority and we can't do much if Kernel Module Loader isn't enabled...
--
Colin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/