linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* temp.c and cputable.c issues
@ 2004-01-14 19:39 valvoline
  2004-01-14 22:10 ` Tom Rini
  0 siblings, 1 reply; 14+ messages in thread
From: valvoline @ 2004-01-14 19:39 UTC (permalink / raw)
  To: linuxppc-dev


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/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: temp.c and cputable.c issues
@ 2004-01-15  9:38 Colin Leroy
  0 siblings, 0 replies; 14+ messages in thread
From: Colin Leroy @ 2004-01-15  9:38 UTC (permalink / raw)
  To: linuxppc-dev


> i've an ibook G4/12". it's branded as PowerMac6,3. It should be
> the lastest model available from apple.
>
> > 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 ?


Well, under 2.6 kernel, you can use the therm_adt7467 module
(CONFIG_THERM_IBOOKG4 configuration option, under Drivers/Macintosh).
It'll create some entries in /sys:
/sys/devices/temperatures/cpu_temperature
/sys/devices/temperatures/gpu_temperature
/sys/devices/temperatures/fan_speed
These display the informations you want.

/sys/devices/temperatures/cpu_limit
/sys/devices/temperatures/gpu_limit
These display the maximum temperatures before fan starts.

--
Colin
Ne disez pas disez, mais disez dites

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-01-16 11:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 19:39 temp.c and cputable.c issues valvoline
2004-01-14 22:10 ` Tom Rini
2004-01-14 20:11   ` valvoline
2004-01-14 22:38     ` Tom Rini
2004-01-15  8:19     ` Colin Leroy
2004-01-15  7:03       ` valvoline
2004-01-15  7:16       ` valvoline
2004-01-15  9:32         ` Colin Leroy
2004-01-16  7:02           ` valvoline
2004-01-16 10:21             ` Colin Leroy
2004-01-16 11:10               ` Geert Uytterhoeven
2004-01-16 11:26                 ` Colin Leroy
2004-01-15  7:20       ` valvoline
  -- strict thread matches above, loose matches on Subject: below --
2004-01-15  9:38 Colin Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).