14 #include <linux/errno.h>
16 #include <linux/kernel.h>
18 #include <linux/string.h>
25 #include <asm/nvram.h>
26 #include <asm/cache.h>
28 #include <asm/machdep.h>
30 static struct tau_temp
47 #define window_expand 1
49 #define shrink_timer 2*HZ
59 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].
low) | THRM1_V | THRM1_TIE | THRM1_TID);
64 mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].
high) | THRM1_V | THRM1_TIE);
67 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TID);
68 mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V);
82 if((thrm =
mfspr(SPRN_THRM1)) & THRM1_TIV){
90 printk(
"low threshold crossed ");
94 if((thrm =
mfspr(SPRN_THRM2)) & THRM1_TIV){
102 printk(
"high threshold crossed ");
111 #ifndef CONFIG_TAU_INT
117 #ifdef CONFIG_TAU_INT
128 tau[
cpu].interrupts++;
136 static void tau_timeout(
void *
info)
147 #ifndef CONFIG_TAU_INT
151 size = tau[
cpu].high - tau[
cpu].low;
185 mtspr(SPRN_THRM3, THRM3_SITV(500*60) | THRM3_E);
190 static void tau_timeout_smp(
unsigned long unused)
225 printk(
"Thermal assist unit not available\n");
239 printk(
"Thermal assist unit ");
240 #ifdef CONFIG_TAU_INT
241 printk(
"using interrupts, ");
245 printk(
"shrink_timer: %d jiffies\n", shrink_timer);
259 return ((tau[cpu].
high << 16) | tau[cpu].
low);
264 return ((tau[cpu].
high + tau[cpu].
low) / 2);
269 return (tau[cpu].interrupts);