linux/drivers/macintosh/windfarm_pm112.c
<<
.64<4" /spav3. 4" /form3. 4" a .64<4" href="../linux+v3.9.5/drivers/macintosh/windfarm_pm11ioc">.64<4" img src="../.static/gfx/right.png" alt=">>">.6 /spav3..6 spav class="lxr_search">.64<.64<4" input typ.24hidden" nam.24navtarget" v3.4.24">.64<4" input typ.24text" nam.24search" id24search">.64<4" butt typ.24submit">Search.64<4"Prefs. 4" /a>.6 /spav3.4<4" " /div3.4<4" " form ace="v="ajax+*" method="post" onsubmit="return false;">.6 input typ.24hidden" nam.24ajax_lookup" id24ajax_lookup" v3.4.24">.4<4" " /form3..4<4" " div class="headingbott m">. div id24file_contents"3
" "1
/a>
spav class="comment">/*
/spav3." "2
/a>
spav class="comment"> * Windfarm PowerMac thermal control.
/spav3." "3
/a>
spav class="comment"> * Control loops for machines with SMU and PPC970MP processors.
/spav3." "4
/a>
spav class="comment"> *
/spav3." "5
/a>
spav class="comment"> * Copyright (C) 2005 Paul Mackerras, IBM Corp. <paulus@samba.org>
/spav3." "6
/a>
spav class="comment"> * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp.
/spav3." "7
/a>
spav class="comment"> *
/spav3." "8
/a>
spav class="comment"> * Use and redistribute under the terms of the GNU GPLv3 >
/spav3." "9
/a>
spav class="comment"> */
/spav3." tiona>#include <linux/typ.s.hona>>." 11ona>#include <linux/errno.hona>>." 12ona>#include <linux/kernel.hona>>." 13ona>#include <linux/device.hona>>." 14ona>#include <linux/platform_device.hona>>." 15ona>#include <linux/reboot.hona>>." 16ona>#include <asm/prom.hona>>." 17ona>#include <asm/smu.hona>>." 18
/a>." 19ona>#include "windfarm.hona>"." 20ona>#include "windfarm_pid.hona>"." 21
/a>." 22ona>#define"
a href="+code=VERSION" class="sref">VERSIONona> 
spav class="string">"0.2"" 23
/a>." 24ona>#define"
a href="+code=DEBUG" class="sref">DEBUG
/a>." 25ona>#undef"
a href="+code=LOTSA_DEBUG" class="sref">LOTSA_DEBUG
/a>." 26
/a>." 27ona>#ifdef"
a href="+code=DEBUG" class="sref">DEBUG
/a>." 28ona>#define"
a href="+code=DBG" class="sref">DBG
/a>(
a href="+code=args" class="sref">args
/a>...)4" "
a href="+code=printk" class="sref">printk
/a>(
a href="+code=args" class="sref">args
/a>)." 29ona>#else." 30ona>#define"
a href="+code=DBG" class="sref">DBG
/a>(
a href="+code=args" class="sref">args
/a>...)4" "do { } while(0)." 31ona>#endif." 32
/a>." 33ona>#ifdef"
a href="+code=LOTSA_DEBUG" class="sref">LOTSA_DEBUG
/a>." 34ona>#define"
a href="+code=DBG_LOTS" class="sref">DBG_LOTS
/a>(
a href="+code=args" class="sref">args
/a>...)4" "" "
a href="+code=printk" class="sref">printk
/a>(
a href="+code=args" class="sref">args
/a>)." 35ona>#else." 36ona>#define"
a href="+code=DBG_LOTS" class="sref">DBG_LOTS
/a>(
a href="+code=args" class="sref">args
/a>...)4" "" "do { } while(0)." 37ona>#endif." 38
/a>." 39
/a>
spav class="comment">/* define"this to force CPU overtemp to 60 degree, useful for testing
/spav3." 40
/a>
spav class="comment"> * the overtemp code
/spav3." 41
/a>
spav class="comment"> */
/spav3." 42ona>#undef"
a href="+code=HACKED_OVERTEMP" class="sref">HACKED_OVERTEMP
/a>." 43
/a>." 44
/a>
spav class="comment">/* We currently only handle 2 chips, 4 cores... */
/spav3." 45ona>#define"
a href="+code=NR_CHIPS" class="sref">NR_CHIPSona>        2." 46ona>#define"
a href="+code=NR_CORES" class="sref">NR_CORESona>        4." 47ona>#define"
a href="+code=NR_CPU_FANS" class="sref">NR_CPU_FANSona>     3 * 
a href="+code=NR_CHIPS" class="sref">NR_CHIPSona>." 48
/a>." 49
/a>
spav class="comment">/* Controls and sensors */
/spav3." 50
/a>static struct 
a href="+code=wf_sensor" class="sref">wf_sensorona> *
a href="+code=sens_cpu_temp" class="sref">sens_cpu_tempona>[
a href="+code=NR_CORES" class="sref">NR_CORESona>];." 51
/a>static struct 
a href="+code=wf_sensor" class="sref">wf_sensorona> *
a href="+code=sens_cpu_power" class="sref">sens_cpu_powerona>[
a href="+code=NR_CORES" class="sref">NR_CORESona>];." 52
/a>static struct 
a href="+code=wf_sensor" class="sref">wf_sensorona> *
a href="+code=hd_temp" class="sref">hd_tempona>;." 53
/a>static struct 
a href="+code=wf_sensor" class="sref">wf_sensorona> *
a href="+code=slots_power" class="sref">slots_powerona>;." 54
/a>static struct 
a href="+code=wf_sensor" class="sref">wf_sensorona> *
a href="+code=u4_temp" class="sref">u4_tempona>;." 55
/a>." 56
/a>static struct 
a href="+code=wf_control" class="sref">wf_controlona> *
a href="+code=cpu_fans" class="sref">cpu_fansona>[
a href="+code=NR_CPU_FANS" class="sref">NR_CPU_FANSona>];." 57
/a>static char *
a href="+code=cpu_fan_nam.s" class="sref">cpu_fan_nam.sona>[
a href="+code=NR_CPU_FANS" class="sref">NR_CPU_FANSona>] = {." 58ona>        
spav class="string">"cpu-rear-fan-0"" 59ona>        
spav class="string">"cpu-rear-fan-1"" 60ona>        
spav class="string">"cpu-front-fan-0"" 61ona>        
spav class="string">"cpu-front-fan-1"" 62ona>        
spav class="string">"cpu-pump-0"" 63ona>        
spav class="string">"cpu-pump-1"" 64
/a>};." 65
/a>static struct 
a href="+code=wf_control" class="sref">wf_controlona> *
a href="+code=cpufreq_clamp" class="sref">cpufreq_clampona>;." 66
/a>." 67
/a>
spav class="comment">/* Second pump isn't required (and isn't actually present) */
/spav3." 68ona>#define"
a href="+code=CPU_FANS_REQD" class="sref">CPU_FANS_REQDona>           (
a href="+code=NR_CPU_FANS" class="sref">NR_CPU_FANSona> - 2)." 69ona>#define"
a href="+code=FIRST_PUMP" class="sref">FIRST_PUMPona>              4." 70ona>#define"
a href="+code=LAST_PUMP" class="sref">LAST_PUMPona>               5." 71
/a>." 72
/a>
spav class="comment">/* We keep a temperature history for average calcula >
  of 180s */
/spav3." 73ona>#define"
a href="+code=CPU_TEMP_HIST_SIZE" class="sref">CPU_TEMP_HIST_SIZEona>      180." 74
/a>." 75
/a>
spav class="comment">/* Scale factor for fan speed, *100 */
/spav3." 76
/a>static int"
a href="+code=cpu_fan_scale" class="sref">cpu_fan_scaleona>[
a href="+code=NR_CPU_FANS" class="sref">NR_CPU_FANSona>] = {." 77ona>        100,." 78ona>        100,." 79ona>        97,             
spav class="comment">/* inlet fans run at 97% of exhaust fan */
/spav3." 80ona>        97,." 81ona>        100,            
spav class="comment">/* updated la er */
/spav3." 82ona>        100,            
spav class="comment">/* updated la er */
/spav3." 83
/a>};." 84
/a>." 85
/a>static struct 
a href="+code=wf_control" class="sref">wf_controlona> *
a href="+code=backside_fan" class="sref">backside_fanona>;." 86
/a>static struct 
a href="+code=wf_control" class="sref">wf_controlona> *
a href="+code=slots_fan" class="sref">slots_fanona>;." 87
/a>static struct 
a href="+code=wf_control" class="sref">wf_controlona> *
a href="+code=drive_bay_fan" class="sref">drive_bay_fanona>;." 88
/a>." 89
/a>
spav class="comment">/* PID loop state */
/spav3." 90
/a>static struct 
a href="+code=wf_cpu_pid_state" class="sref">wf_cpu_pid_stateona> 
a href="+code=cpu_pid" class="sref">cpu_pidona>[
a href="+code=NR_CORES" class="sref">NR_CORESona>];." 91
/a>static 
a href="+code=u32" class="sref">u32
/a> 
a href="+code=cpu_thist" class="sref">cpu_thistona>[
a href="+code=CPU_TEMP_HIST_SIZE" class="sref">CPU_TEMP_HIST_SIZEona>];." 92
/a>static int"
a href="+code=cpu_thist_pt" class="sref">cpu_thist_ptona>;." 93
/a>static 
a href="+code=s64" class="sref">s64
/a>"
a href="+code=cpu_thist_total" class="sref">cpu_thist_totalona>;." 94
/a>static 
a href="+code=s32" class="sref">s32
/a> 
a href="+code=cpu_all_tmax" class="sref">cpu_all_tmax
/a> = 100 << 16;." 95
/a>static int"
a href="+code=cpu_last_target" class="sref">cpu_last_targetona>;." 96
/a>static struct 
a href="+code=wf_pid_state" class="sref">wf_pid_stateona> 
a href="+code=backside_pid" class="sref">backside_pidona>;." 97
/a>static int"
a href="+code=backside_tick" class="sref">backside_tickona>;." 98
/a>static struct 
a href="+code=wf_pid_state" class="sref">wf_pid_stateona> 
a href="+code=slots_pid" class="sref">slots_pidona>;." 99
/a>static int"
a href="+code=slots_started" class="sref">slots_startedona>;."100
/a>static struct 
a href="+code=wf_pid_state" class="sref">wf_pid_stateona> 
a href="+code=drive_bay_pid" class="sref">drive_bay_pidona>;."101
/a>static int"
a href="+code=drive_bay_tick" class="sref">drive_bay_tickona>;."102
/a>."103
/a>static int"
a href="+code=nr_cores" class="sref">nr_coresona>;."104
/a>static int"
a href="+code=have_all_controls" class="sref">have_all_controlsona>;."105
/a>static int"
a href="+code=have_all_sensors" class="sref">have_all_sensorsona>;."106
/a>static int"
a href="+code=started" class="sref">startedona>;."107
/a>."108
/a>static int"
a href="+code=failure_state" class="sref">failure_stateona>;."109ona>#define"
a href="+code=FAILURE_SENSOR" class="sref">FAILURE_SENSORona>          1."110ona>#define"
a href="+code=FAILURE_FAN" class="sref">FAILURE_FANona>             2."111ona>#define"
a href="+code=FAILURE_PERM" class="sref">FAILURE_PERMona>            4."112ona>#define"
a href="+code=FAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona>    8."113ona>#define"
a href="+code=FAILURE_HIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona>   16."114
/a>."115
/a>
spav class="comment">/* Overtemp v3.4.s */
/spav3."116ona>#define"
a href="+code=LOW_OVER_AVERAGE" class="sref">LOW_OVER_AVERAGEona>        0."117ona>#define"
a href="+code=LOW_OVER_IMMEDIATE" class="sref">LOW_OVER_IMMEDIATEona>      (10 << 16)."11string">"cpu-front-fan-LOW_OVER_CL=wR" class="sref">FOW_OVER_CL=wR"na>           ((-10)<< 16)." 11ona>#define"
a href="+code=FIGH_OVERTIMMEDIATE" class="sref">LIGH_OVERTIMMEDIATE"na>      (14<< 16)." 12ona>#define"
a href="+code=FIGH_OVERTIVERAGE" class="sref">LIGH_OVERTIVERAGE"na>        10 << 16)." 12ona>#define"
a href="+code=FIGH_OVERTIMMEDIATE" class="sref">LIGH_OVERTIMMEDIATE"na>      (14<< 16)."112
/a>." 13
/a>." 12
/a>
spav class="comment">/* WImpleent" >
  .. */
/spav3." 12
/a>static int"
a href="+code=cpreteocpu_poop  class="sref">cpreteocpu_poop /a>s(nt"
a href="+code=cpu_ class="sref">cpu_/a>s." 16
/a>.." 12ona>        1nt"
a href="+code=cphi  class="sref">cphi /a> = 1a href="+code=cpu_ class="sref">cpu_/a>s / 2." 128na>        1nt"
a href="+code=cpres class="sref">cpres/a> = 1a href="+code=cpu_ class="sref">cpu_/a>s & 16." 12ona>        9truct 
a href="+code=wsmu_sdbp_eadir" class="sref">slmu_sdbp_eadir"na> *
a href="+code=dhd" class="sref">shd"na>;." 130na>        9truct 
a href="+code=wsmu_sdbp_pu_piddata class="sref">slmu_sdbp_pu_piddatana> *
a href="+code=dpiddata class="sref">spiddatana> ." 131na>        9truct 
a href="+code=wf_cpu_pid_sparam class="sref">wf_cpu_pid_sparamna> 
a href="+code=did" class="sref">didona>;." 132na>        9truct 
a href="+code=wf_cpntrol" class="sref">wf_controlona> *
a href="+code=dmainfan" class="sref">dmainfan"/a> = 1a href="+code=cpu_fans" class="sref">cpu_fansona>[
0;." 13ona>        
s href="+code=s32" class="sref">s32
/a> 
a href="+code=cmax" class="sref">cmax
/a> ." 14ona>#       1nt"
a href="+code=cfmi" class="sref">dfmi"/a> ." 13
/a>." 16ona>#       
spav class="comment">/* uGetPID lparams fromthe oapproprite *SAT*/
/spav3." 137na>        
s href="+code=shd" class="sref">shd"na>;= 1a href="+code=clmu_sat_get_sdbsparti>
   class="sref">slmu_sat_get_sdbsparti>
  /a>s(a href="+code=cphi  class="sref">cphi /a> , 0xC8 +
a href="+code=cpres class="sref">cpres/a> ,
a href="+code=NRULL class="sref">NRULL/a>s.." 138na>        1nf(
a href="+code=Nhd" class="sref">shd"na>;=  1a href="+code=cRULL class="sref">NRULL/a>s.{." 13ona>        9       
s href="+code=srintk" class="sref">printk
/a>(
a href="+code=aKERN_WARNIN" class="sref">LKERN_WARNIN"/a>
spav class="ctring">"cindfarm_: ca't agetCPU oID lan *ontfig\nquot;" 140na>        9       
eturn f-a href="+code=aEINVAL class="sref">NEINVAL/a> ." 141na>        9}" 142na>        
s href="+code=spiddata class="sref">spiddatana> = 1(truct 
a href="+code=wsmu_sdbp_pu_piddata class="sref">slmu_sdbp_pu_piddatana> *
)& a href="+code=Nhd" class="sref">shd"na>;[1;." 13
/a>." 144na>#       
spav class="comment">/* uGetPFVTlparams toagetCTax
;1nf(not found, ss=umedefiault*/
/spav3." 15ona>#       
s href="+code=shd" class="sref">shd"na>;= 1a href="+code=clmu_sat_get_sdbsparti>
   class="sref">slmu_sat_get_sdbsparti>
  /a>s(a href="+code=cphi  class="sref">cphi /a> , 0xC4 +
a href="+code=cpres class="sref">cpres/a> ,
a href="+code=NRULL class="sref">NRULL/a>s.." 146na>        1nf(
a href="+code=Nhd" class="sref">shd"na>;.{." 147na>        9       
truct 
a href="+code=wsmu_sdbp_fv" class="sref">csmu_sdbp_fv"na> *
a href="+code=dfv" class="sref">cfv"na> * 1(truct 
a href="+code=wsmu_sdbp_fv" class="sref">csmu_sdbp_fv"na> *
)& a href="+code=Nhd" class="sref">shd"na>;[1;." 148na>        9       
s href="+code=smax" class="sref">cmax
/a> = 1a href="+code=cfv" class="sref">cfv"na> -gt;
/ href="+code=dmaxemp" class="sref">umaxemp"/a>s &t;< 16;." 14ona>        9} lse." 150na>        9       
s href="+code=smax" class="sref">cmax
/a> = 195 &t;< 16;.       
spav class="comment">/* uefiault*toa95 egree,s C*/
/spav3." 15
/a>." 15ona>        
spav class="somment">/* We keep a tglobal max
for fvertemp colcula >
   */
/spav3." 153na>        1nf(
a href="+code=Nmax" class="sref">cmax
/a> =lt; 1a href="+code=cpu_fll_tmax" class="sref">cpu_all_tmax
/a> ." 154na>        9       
s href="+code=spu_all_tmax" class="sref">cpu_all_tmax
/a> = 1a href="+code=cmax" class="sref">cmax
/a> ." 15
/a>." 15ona>#       
spav class="comment">/* /spav3." 15
/a>
spav class="comment"> ********** Darind hasa tminimumfan speed,of 18000 rpmfor tehe 4-wayand /spav3." 15
/a>
spav class="comment"> ********** 515for tehe 2-way.  Thatoappears toab overtkill, s forc(now,/spav3." 15
/a>
spav class="comment"> ********** impoe antminimumff 1750 rc(515
/spav3." 16
/a>
spav class="comment"> **********
/spav3." 11ona>        
s href="+code=cfmi" class="sref">dfmi"/a> * 1(a href="+code=nr_cores" class="sref">nr_coresona>; gt;
 2) ?1750 :(515." 16
/a>." 13ona>        
spav class="somment">/* WIni>
alizePID loop s*
/spav3." 164na>        
s href="+code=cid" class="sref">didona>;.s href="+code=cntoervl" class="sref">cntoervl"/a> * 11;      
spav class="somment">/* Wscond  */
/spav3." 16ona>#       
s href="+code=sid" class="sref">didona>;.s href="+code=cistory _le" class="sref">distory _le"/a> = 1a href="+code=cpiddata class="sref">spiddatana> -gt;
/ href="+code=distory _le" class="sref">distory _le"/a> ." 166na>#       
s href="+code=sid" class="sref">didona>;.s href="+code=cg" class="sref">dgd/a> = 1a href="+code=cpiddata class="sref">spiddatana> -gt;
/ href="+code=dg" class="sref">dgd/a> ." 167na>        
s href="+code=sid" class="sref">didona>;.s href="+code=cg" class="sref">ug /a> = 1a href="+code=cpiddata class="sref">spiddatana> -gt;
/ href="+code=dg" class="sref">ug /a> ." 168na>        
s href="+code=sid" class="sref">didona>;.s href="+code=cg" class="sref">sg"na>;= 1a href="+code=cpiddata class="sref">spiddatana> -gt;
/ href="+code=dg" class="sref">sg"na>;=/1a href="+code=cpiddata class="sref">spiddatana> -gt;
/ href="+code=distory _le" class="sref">distory _le"/a> ." 169na>        
s href="+code=sid" class="sref">didona>;.s href="+code=cpax
adj class="sref">diax
adj/a> * 1(a href="+code=npiddata class="sref">spiddatana> -gt;
/ href="+code=dmx_prwer" class="sref">smx_prwer"/a>s &t;< 16;) -1(a href="+code=npiddata class="sref">spiddatana> -gt;
/ href="+code=drwer"_adj class="sref">diwer"_adj/a>s &t;< 18.." 170na>        
s href="+code=sid" class="sref">didona>;.s href="+code=ctarget" class="sref">ctargetona>;= 1a href="+code=cmax" class="sref">cmax
/a>  -1(a href="+code=npiddata class="sref">spiddatana> -gt;
/ href="+code=dargetotempo_delta class="sref">sargetotempo_delta/a>s &t;< 16;)." 17ona>        
s href="+code=cid" class="sref">didona>;.s href="+code=ctax" class="sref">cmax
/a> = 1a href="+code=cmax" class="sref">cmax
/a> ." 172na>        
s href="+code=spid class="sref">didona>;.s href="+code=cmi" class="sref">dmi"/a> * 1a href="+code=dmainfan" class="sref">dmainfan"/a> -gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotmi" class="sref">dgtotmi"/a>s(a href="+code=cmainfan" class="sref">dmainfan"/a> )." 17ona>        
s href="+code=spid class="sref">didona>;.s href="+code=cmx" class="sref">cax
/a> = 1a href="+code=cmainfan" class="sref">dmainfan"/a> -gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotmx" class="sref">cgtotmx"/a>s(a href="+code=cmainfan" class="sref">dmainfan"/a> )." 17ona>#       1nf(
a href="+code=Npid class="sref">didona>;.s href="+code=cmi" class="sref">dmi"/a> *lt; 1a href="+code=cfmi" class="sref">dfmi"/a> ." 17ona>#       
       
s href="+code=spid class="sref">didona>;.s href="+code=cmi" class="sref">dmi"/a> * 1a href="+code=dfmi" class="sref">dfmi"/a> ." 17
/a>." 177na>        
s href="+code=sf_cpu_pid_sini> class="sref">df_cpu_pid_sini>/a>s(& a href="+code=Npu_pid" class="sref">cpu_pidona>[
a href="+code=Npu_ class="sref">cpu_/a>s], & a href="+code=Npid class="sref">didona>;)." 18ona>        1eturn f0." 19ona> }" 10ona> " 18
/a>static ivoid
s href="+code=spu_amx_pll_tans" class="sref">cpu_fmx_pll_tans"/a>s(void." 12ona> ." 183na>        1nt"
a href="+code=ci class="sref">cn/a> ." 14
/a>." 18ona>#       
spav class="somment">/* We kax
fll_CPU oans ri claseff 1asensors error.We kalsodo {th
/spav3." 16
/a>sspav class="comment"> ********** pufreq_clasmping(now, even1nf(it#39;ts suppoe dlydo nela er *by{th
/spav3." 18
/a>
spav class="comment"> ********** eneric/code
 anyway, wedo {it earlir *here toareac fanstr"/apav3." 18
/a>
spav class="comment"> **********
/spav3." 189na>#       1nf(
a href="+code=Npufreq_clamp" class="sref">cpufreq_clampona>;." 190na>        9       
s href="+code=sf_controlo_stotmx" class="sref">cf_controlo_stotmx"/a>s(a href="+code=cpufreq_clamp" class="sref">cpufreq_clampona>;.." 19ona>        
orc((a href="+code=ci class="sref">cn/a> * 10 1a href="+code=ci class="sref">cn/a> *lt; 1a href="+code=cR_CPU_FANS" class="sref">NR_CPU_FANSona>]; ++a href="+code=ci class="sref">cn/a> ." 192na>        9       
nf(
a href="+code=Npuffans" class="sref">cpu_fansona>[
a href="+code=Ni class="sref">cn/a> ]." 193na>        9       
       
s href="+code=sf_controlo_stotmx" class="sref">cf_controlo_stotmx"/a>s(a href="+code=cpuffans" class="sref">cpu_fansona>[
a href="+code=Ni class="sref">cn/a> ].." 14
/a>s}" 19
/a>." 19
/a>static int"
a href="+code=cpu_fcheck_vertemp  class="sref">cpu_fcheck_vertemp /a>s(a href="+code=c32" class="sref">s32
/a> 
a href="+code=cmmp  class="sref">cemp /a>s." 17
/a>s." 198na>        1nt"
a href="+code=cnewstate" class="sref">fnewstate"/a> * 10 " 199na>        
s href="+code=s32" class="sref">s32
/a> 
a href="+code=cm_avg class="sref">ce_avg/a> ,
a href="+code=Nt_old class="sref">dt_old/a> ."120ona> "120ona>        
spav class="somment">/* WFirst check
orc(imendite *vertemp  */
/spav3."1202na>#       1nf(
a href="+code=Nmmp  class="sref">cemp /a>s gt;
 1(a href="+code=npu_all_tmax" class="sref">cpu_all_tmax
/a> =+
a href="+code=cOW_OVER_IMMEDIATE" class="sref">LOW_OVER_IMMEDIATEona> ).{."1203na>        9       
a href="+code=cnewstate" class="sref">fnewstate"/a> *| 1a href="+code=dAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona>         9       
nf(
(a href="+code=nailure_state" class="sref">failure_stateona>; & 1a href="+code=dAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona> )=  1)."120ona>#       
       
       
a href="+code=crintk" class="sref">printk
/a>(
a href="+code=aKERN_ER" class="sref">FKERN_ER"/a> 
apav class="ctring">"cindfarm_: vertemp vdue toaimendite *PU_quot;"1206na>#       
       
       
      
spav class="string">"ctemperature h!\nquot;"1207na>        
}"1208na>        1nf(
a href="+code=Nmmp  class="sref">cemp /a>s gt;
 1(a href="+code=npu_all_tmax" class="sref">cpu_all_tmax
/a> =+
a href="+code=cIGH_OVERTIMMEDIATE" class="sref">LIGH_OVERTIMMEDIATE"na> ).{."120ona>        9       
s href="+code=snewstate" class="sref">fnewstate"/a> *| 1a href="+code=dAILURE_LIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona> ."1210na>        9       
nf(
(a href="+code=nailure_state" class="sref">failure_stateona>; & 1a href="+code=dAILURE_LIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona> )=  1)."1211na>#       
       
       
a href="+code=crintk" class="sref">printk
/a>(
a href="+code=aKERN_ER" class="sref">FKERN_ER"/a> 
apav class="ctring">"cindfarm_: Criic alfvertemp cdue toquot;"1212na>        9       
       
      
spav class="string">"ctimendite *PU_temperature h!\nquot;"1213na>        
}"124
/a>."121ona>#       
spav class="somment">/* We kolcula > antistory fofkax
femperature  and suse thatoor tehe/spav3,"121
/a>sspav class="comment"> ********** vertemp cmanageent"/spav3,"121
/a>
spav class="comment"> **********
/spav3."1218na>        
s href="+code=st_old class="sref">dt_old/a> = 1a href="+code=cpu_fhist" class="sref">cpu_thistona>[
a href="+code=Cpu_thist_pt" class="sref">cpu_thist_ptona>;;." 219na>        
s href="+code=spu_fhist" class="sref">cpu_thistona>[
a href="+code=Cpu_thist_pt" class="sref">cpu_thist_ptona>;;= 1a href="+code=cmmp  class="sref">cemp /a>s." 220na>        
s href="+code=spu_thist_pt" class="sref">cpu_thist_ptona>;* 1(a href="+code=npu_thist_pt" class="sref">cpu_thist_ptona>;*+ 1) #37; oa href="+code=nPU_TEMP_HIST_SIZE" class="sref">CPU_TEMP_HIST_SIZEona>]." 22ona>        
s href="+code=cpu_thist_total" class="sref">cpu_thist_totalona>; - 1a href="+code=cm_old class="sref">dt_old/a> ."1222na>        
s href="+code=spu_thist_total" class="sref">cpu_thist_totalona>; + 1a href="+code=cmmp  class="sref">cemp /a>s." 22ona>        
s href="+code=sm_avg class="sref">ce_avg/a> = 1a href="+code=cpu_fhist"total" class="sref">cpu_thist_totalona>; /1a href="+code=cPU_TEMP_HIST_SIZE" class="sref">CPU_TEMP_HIST_SIZEona>]." 22
/a>." 22ona>#       
s href="+code=sDBG_LOT" class="sref">NDBG_LOT"/a>(
apav class="string">"ce_avg= 1#37; d.#37; 03d (out:1#37; d.#37; 03d, in:1#37; d.#37; 03d)\nquot;" 226na>#       
       
 a href="+code=dAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=am_avg class="sref">ce_avg/a> ),
a href="+code=NAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=am_old class="sref">dt_old/a> ),
a href="+code=NAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..." 22
/a>." 228na>        1spav class="somment">/* WNow check
orc(verage cvertemp  */
/spav3." 229na>#       1nf(
a href="+code=Nm_avg class="sref">ce_avg/a> =gt;
 1(a href="+code=npu_all_tmax" class="sref">cpu_all_tmax
/a> =+
a href="+code=cOW_OVER_IVERAGE" class="sref">LOW_OVER_AVERAGEona> ).{." 230na>        9       
s href="+code=snewstate" class="sref">fnewstate"/a> *| 1a href="+code=dAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona> " 231na>#       
       
nf(
(a href="+code=nailure_state" class="sref">failure_stateona>; & 1a href="+code=dAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona> )=  1)." 232na>        9       
       
a href="+code=crintk" class="sref">printk
/a>(
a href="+code=aKERN_ER" class="sref">FKERN_ER"/a> 
apav class="ctring">"cindfarm_: vertemp vdue toaverage cPU_quot;" 233na>        9       
       
      1spav class="string">"ctemperature h!\nquot;" 24ona>#       1}" 235na>#       1nf(
a href="+code=Nm_avg class="sref">ce_avg/a> =gt;
 1(a href="+code=npu_all_tmax" class="sref">cpu_all_tmax
/a> =+
a href="+code=cIGH_OVERTIVERAGE" class="sref">LIGH_OVERTIVERAGE"na> ).{." 236na>#       
       
s href="+code=snewstate" class="sref">fnewstate"/a> *| 1a href="+code=dAILURE_LIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona> ." 237na>        9       
nf(
(a href="+code=nailure_state" class="sref">failure_stateona>; & 1a href="+code=dAILURE_LIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona> )=  1)." 238na>        9       
       
a href="+code=crintk" class="sref">printk
/a>(
a href="+code=aKERN_ER" class="sref">FKERN_ER"/a> 
apav class="ctring">"cindfarm_: Criic alfvertemp cdue toquot;" 23ona>        9       
       
      1spav class="string">"ctverage cPU_temperature h!\nquot;" 240na>        9}" 24
/a>." 24ona>        
spav class="somment">/* WNow handlefvertemp coondi>
  s.We kdo't acurrnt"lysuse the indfarm_/spav3," 23
/a>.spav class="comment"> ********** vertemp chandling(ores as(it#39;ts not fullyssuied lt {th
 needsfofkthose/spav3," 24
/a>
spav class="comment">/********** new acihne". This inllab ofixd la er 
/spav3." 24
/a>
spav class="comment">/**********
/spav3." 246na>        1nf(
a href="+code=Nnewstate" class="sref">fnewstate"/a> .{." 247na>        9       
spav class="somment">/* WHigh vertemp c-gt;
timendite *shutdown**
/spav3." 248na>        9       
nf(
a href="+code=Nnewstate" class="sref">fnewstate"/a>  & 1a href="+code=dAILURE_LIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona> )" 24ona>        9       
       
a href="+code=dacihne"prwer"_off class="sref">Facihne"prwer"_off/a>(
.." 250na>        9       
nf(
(a href="+code=nailure_state" class="sref">failure_stateona>; & 1a href="+code=dnewstate" class="sref">fnewstate"/a> .{! 1a href="+code=dnewstate" class="sref">fnewstate"/a> ." 251na>#       
       
       
a href="+code=cpu_amx_pll_tans" class="sref">cpu_fmx_pll_tans"/a>s(.." 252na>        9       
a href="+code=nailure_state" class="sref">failure_stateona>; | 1a href="+code=dnewstate" class="sref">fnewstate"/a> ." 253na>        1} lse.
nf(
(a href="+code=nailure_state" class="sref">failure_stateona>; & 1a href="+code=dAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona> )=& & " 254na>        9       




a href="+code=Nmmp  class="sref">cemp /a>s gt; 1(a href="+code=npu_all_tmax" class="sref">cpu_all_tmax
/a> =+
a href="+code=cOW_OVER_IL=wR" class="sref">FOW_OVER_CL=wR"na> )).{." 25ona>#       
       
s href="+code=spintk" class="sref">printk
/a>(
a href="+code=aKERN_ER" class="sref">FKERN_ER"/a> 
apav class="ctring">"cindfarm_: vertemp voondi>
  claeard l!\nquot;" 256na>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; & = ~a href="+code=dAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona> " 257na>        
}" 25
/a>
" 25ona>        9eturn fa href="+code=nailure_state" class="sref">failure_stateona>; & 1
a href="+code=aAILURE_LOW_OVERTEMP" class="sref">FAILURE_LOW_OVERTEMPona>  |1a href="+code=dAILURE_LIGH_OVERTEMP" class="sref">FAILURE_HIGH_OVERTEMPona> )" 26
/a>
}" 26
/a>." 26
/a>.tatic ivoid
s href="+code=spu_aans"tick" class="sref">dpu_aans"tick"/a>(
void." 23ona> ." 264na>        
nt"
a href="+code=cer" class="sref">ser"na> ,
a href="+code=Npu_ class="sref">cpu_/a>s" 26ona>#       
s href="+code=s32" class="sref">s32
/a> 
a href="+code=cgreteost_delta class="sref">sgreteost_delta/a> = 10 " 266na>#       
s href="+code=s32" class="sref">s32
/a> 
a href="+code=cmmp  class="sref">cemp /a>s,
a href="+code=Nrwer" class="sref">srwer"/a>s,
a href="+code=Nt_ax" class="sref">cm_ax
/a> = 10 " 26ona>        1nt"
a href="+code=ci class="sref">cn/a> ,
a href="+code=Nt class="sref">cm/a> ,
a href="+code=Ntrget" class="sref">ctrgetona>;= 10 " 268na>        
truct 
a href="+code=wf_censors class="sref">cf_censorsna>  
a href="+code=ds" class="sref">sl"na>;." 26ona>        9truct 
a href="+code=wf_cpntrol" class="sref">wf_controlona> *
a href="+code=dc" class="sref">cptna>;." 270na>        
truct 
a href="+code=wf_cpu_pid_state" class="sref">ff_cpu_pid_state"na>  
a href="+code=ds  class="sref">cs /a>s." 27
/a>." 272na>        
s href="+code=sDBG_LOT" class="sref">NDBG_LOT"/a>(
a href="+code=aKERN_DEBU" class="sref">LKERN_DEBU"na> )" 27ona>        
orc((a href="+code=cpu_ class="sref">cpu_/a>s  10 1a href="+code=cpu_ class="sref">cpu_/a>s &t; 1a href="+code=cr_cores" class="sref">nr_coresona>;; ++a href="+code=cpu_ class="sref">cpu_/a>s.{." 274na>        9       
spav class="comment">/* uGetPPU_tores emperature h*
/spav3." 27ona>#       
       
s href="+code=ss" class="sref">sl"na>;= 1a href="+code=clnsocpu_pmmp  class="sref">clnsocpu_pmmp na>;
a href="+code=Npu_ class="sref">cpu_/a>s]" 276na>#       
       
s href="+code=ser" class="sref">ser"na> = 1a href="+code=cl" class="sref">sl"na>;-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotvalu" class="sref">fgtotvalu"/a>(
a href="+code=al" class="sref">sl"na>;, & a href="+code=Nmmp  class="sref">cemp /a>s." 277na>        9       
nf(
s href="+code=ser" class="sref">ser"na> .{." 278na>        9       
       
a href="+code=cDBG class="sref">NDBG/a>(
apav class="ctring">"c\nquot;" 27ona>        9       
       
a href="+code=drintk" class="sref">printk
/a>(
a href="+code=aKERN_WARNIN" class="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: CU_t#37; d emperature hquot;" 280na>        9       
      9       
spav class="ctring">"censors errort#37; d\nquot;cpu_/a>s.1a href="+code=cer" class="sref">ser"na> .." 281na>#       
       
       
a href="+code=cailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HSENSO" class="sref">FAILURE_HSENSO"/a>s." 282na>        9       
       
a href="+code=cpu_amx_pll_tans" class="sref">cpu_fmx_pll_tans"/a>s(.." 283na>        9       
       
eturn ." 284na>        9       
}" 28
/a>." 286na>#       
       
spav class="comment">/* uKep atrackfofkhighest empeh*
/spav3." 287na>        9       
s href="+code=Nt_ax" class="sref">cm_ax
/a> = 1a href="+code=dac" class="sref">cax
/a> 
a href="+code=Nm_ax" class="sref">cm_ax
/a> ,
a href="+code=Ntmp  class="sref">cemp /a>s." 28
/a>
" 28ona>        9       
spav class="comment">/* uGetPPU_trwer"h*
/spav3." 290na>        9       
s href="+code=ss" class="sref">sl"na>;= 1a href="+code=clnsocpu_prwer" class="sref">slnsocpu_prwer"na>;
a href="+code=Npu_ class="sref">cpu_/a>s]" 291na>#       
       
s href="+code=ser" class="sref">ser"na> = 1a href="+code=cl" class="sref">sl"na>;-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotvalu" class="sref">fgtotvalu"/a>(
a href="+code=al" class="sref">sl"na>;, & a href="+code=Nrwer" class="sref">srwer"/a>s." 292na>        9       
nf(
a href="+code=Ner" class="sref">ser"na> .{." 293na>        9       
       
s href="+code=sDBG class="sref">NDBG/a>(
apav class="ctring">"c\nquot;" 294na>        9       



    
s href="+code=srintk" class="sref">printk
/a>(
a href="+code=aKERN_WARNIN" class="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: CU_t#37; d rwer"hquot;" 29ona>#       
       
       
      
spav class="ctring">"censors errort#37; d\nquot;cpu_/a>s.1a href="+code=cer" class="sref">ser"na> .." 296na>#       
       
       
a href="+code=cailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HSENSO" class="sref">FAILURE_HSENSO"/a>s." 297na>        9       
       
a href="+code=cpu_amx_pll_tans" class="sref">cpu_fmx_pll_tans"/a>s(.." 298na>        9       
       
eturn ." 29ona>        9       
}"130ona> "1301na>#       
       
spav class="comment">/* uRunPID l*
/spav3."1302na>        9       
a href="+code=ns  class="sref">cs /a>s= 1#amp a href="+code=Npu_pid" class="sref">cpu_pidona>[
a href="+code=Npu_ class="sref">cpu_/a>s]."1303na>        9       
a href="+code=ct class="sref">cm/a> = 1a href="+code=cf_cpu_pid_sru" class="sref">df_cpu_pid_sru"/a>(
a href="+code=al  class="sref">cs /a>s,
a href="+code=Nrwer" class="sref">srwer"/a>s,
a href="+code=Ntmp  class="sref">cemp /a>s.."130ona>#       
       
nf(
a href="+code=Npuf class="sref">cpu_/a>s  = 0 ||1a href="+code=dl  class="sref">cs /a>s-gt;
/ href="+code=dasst_delta class="sref">sasst_delta/a>s &g; 1a href="+code=cgreteost_delta class="sref">sgreteost_delta/a> .{."1306na>#       
       
       
a href="+code=cgreteost_delta class="sref">sgreteost_delta/a> = 1a href="+code=dl  class="sref">cs /a>s-gt;
/ href="+code=dasst_delta class="sref">sasst_delta/a>s"1307na>        9       
       
a href="+code=ctrget" class="sref">ctrgetona>;= 1a href="+code=ct class="sref">cm/a> "1308na>        9       
}"130ona>        9       
s href="+code=sDBG_LOT" class="sref">NDBG_LOT"/a>(
apav class="string">"c[#37; d] P=#37; d.#37; .3d T=#37; d.#37; .3d quot;"1310na>        9       
   
s href="+code=spu_ class="sref">cpu_/a>s.1a href="+code=cAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=arwer" class="sref">srwer"/a>s.,
a href="+code=NAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..."1311na>#       
}"1312na>        
s href="+code=sDBG_LOT" class="sref">NDBG_LOT"/a>(
apav class="string">"cans r 1#37; d, m_ax
= 1#37; d.#37; 03d\nquot;ctrgetona>;,
a href="+code=NAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=am_ax" class="sref">cm_ax
/a> ..."1313na> "1314na>        
spav class="comment">/* uDarind limits decretse toa20 per itratu
  c*
/spav3."131ona>#       
nf(
a href="+code=Nmrget" class="sref">ctrgetona>;=gt; 1(a href="+code=npu_aasst_mrget" class="sref">cpu_aasst_mrget"na>;=-a20)."1316na>#       
       
s href="+code=strget" class="sref">ctrgetona>;= 1a href="+code=cpu_aasst_mrget" class="sref">cpu_aasst_mrget"na>;=-a20."1317na>        
s href="+code=spu_aasst_mrget" class="sref">cpu_aasst_mrget"na>;= 1a href="+code=ctrget" class="sref">ctrgetona>;."1318na>        
orc((a href="+code=cpu_ class="sref">cpu_/a>s  10 1a href="+code=cpu_ class="sref">cpu_/a>s &t; 1a href="+code=cr_cores" class="sref">nr_coresona>;; ++a href="+code=cpu_ class="sref">cpu_/a>s." 31ona>        9       
s href="+code=spu_pid" class="sref">cpu_pidona>[
a href="+code=Npu_ class="sref">cpu_/a>s].s href="+code=ctrget" class="sref">ctrgetona>;= 1a href="+code=ctrget" class="sref">ctrgetona>;." 32ona> " 32ona>        
spav class="somment">/* WHandlefpossibl cvertemp  */
/spav3."1322na>        
nf(
a href="+code=Npuffcheck_vertemp  class="sref">cpu_fcheck_vertemp /a>s(a href="+code=cm_ax" class="sref">cm_ax
/a> .." 323na>        9       
eturn ." 32
/a>." 32ona>#       
spav class="somment">/* WSetoans r/
/spav3." 326na>#       
orc((a href="+code=ci class="sref">cn/a> * 10 1a href="+code=ci class="sref">cn/a> *lt; 1a href="+code=cR_CPU_FANS" class="sref">NR_CPU_FANSona>]; ++a href="+code=ci class="sref">cn/a> .{." 327na>        9       
s href="+code=Nc" class="sref">cptna>;= 1a href="+code=cpu_aans" class="sref">cpu_fansona>[
a href="+code=Ni class="sref">cn/a> ]." 328na>        9       
nf(
a href="+code=Nc" class="sref">cptna>;=  1a href="+code=cNULL class="sref">NRULL/a>s." 32ona>        9       
       
ontrinue." 330na>        9       
s href="+code=ser" class="sref">ser"na> = 1a href="+code=cc" class="sref">cptna>;-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dstotvalu" class="sref">fstotvalu"/a>(
a href="+code=ac" class="sref">cptna>;,
a href="+code=Ntrget" class="sref">ctrgetona>;=*1a href="+code=cpu_aans_scal" class="sref">fpu_aans_scal"na>[
a href="+code=Ni class="sref">cn/a> ] / 100.." 331na>#       
       
nf(
a href="+code=Ner" class="sref">ser"na> .{." 332na>        9       
       
a href="+code=crintk" class="sref">printk
/a>(
a href="+code=aKERN_WARNIN" class="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: ans1#37; s
etports quot;" 333na>        9       
       
      1spav class="string">"cerrort#37; d\nquot;cptna>;-gt;
/ href="+code=dam.2 class="sref">nrm.2/a>s.1a href="+code=cer" class="sref">ser"na> .." 334na>        9       



    
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HANS class="sref">FAILURE_HANSna>;." 33ona>#       
       
       
break." 336na>#       
       
}" 337na>        
}" 338na> }" 33ona> " 340na> spav class="somment">/* WBackside/U4 ans1/
/spav3." 34
/a>.tatic itruct 
a href="+code=wf_cid_sparam class="sref">df_cid_sparam/a>

a href="+code=wbacksidesparam class="sref">dbacksidesparamna> = 1." 34ona>        
.s href="+code=cntoervl" class="sref">cntoervl"na>        = 5." 343na>        
.s href="+code=cistory _le" class="sref">distory _le"na>     = 2." 344na>        
.s href="+code=cg" class="sref">cgdna>#       
     = 48*lt; lt; 120." 345na>        
.s href="+code=cg  class="sref">cgpna>#       
     = 5*lt; lt; 120." 346na>        1.s href="+code=cg" class="sref">sgrna>#       
     = 0." 347na>        9.s href="+code=cntrget" class="sref">citrgetona>;= 
     = 64*lt; lt; 116." 348na>        9.s href="+code=caddi>
v" class="sref">faddi>
v"na>        = 1." 34ona> }." 35ona> " 35
/a>.tatic ivoid
s href="+code=sbacksidesans_ick" class="sref">dbacksidesans_ick"/a>(
void." 352na> ." 35ona>        
s href="+code=s32" class="sref">s32
/a> 
a href="+code=cmmp  class="sref">cemp /a>s." 354na>        9nt"
a href="+code=cspee" class="sref">cspee"/a>s." 35ona>#       
nt"
a href="+code=cer" class="sref">ser"na> ." 356na>#" 357na>        
nf(
!s href="+code=sbacksidesans class="sref">dbacksidesansna>; || !s href="+code=su4pmmp  class="sref">cu4pmmp /a>s." 358na>        9       
eturn ." 359na>#       1nf(
!s href="+code=sbacksidesick" class="sref">dbacksidesick"/a>(.{." 360na>        9       
spav class="somment">/* Wfirst time;
nti>
alize thing r/
/spav3." 361na>#       
       
s href="+code=srintk" class="sref">printk
/a>(
a href="+code=aKERN_INFO class="sref">LKERN_INFO/a>

apav class="ctring">"cindfarm_: Backside ontrolo loopitrarted.\nquot;" 362na>        9       
a href="+code=nbacksidesparam class="sref">dbacksidesparamna> .s href="+code=cmis class="sref">dmisna> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotmis class="sref">dgtotmis/a>(
a href="+code=abacksidesans class="sref">dbacksidesansna>;.." 363na>        9       
a href="+code=cbacksidesparam class="sref">dbacksidesparamna> .s href="+code=cmc" class="sref">cax
/a> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotmc" class="sref">cgtotmc"/a>(
a href="+code=abacksidesans class="sref">dbacksidesansna>;.." 364na>        9       
a href="+code=wf_cid_snti> class="sref">df_cid_snti>/a>(
#amp a href="+code=Nbacksidespd" class="sref">cbacksidespd"/a>s.1#amp a href="+code=Nbacksidesparam class="sref">dbacksidesparamna> .." 36ona>#       
       
s href="+code=sbacksidesick" class="sref">dbacksidesick"/a>( = 1." 366na>#       
}" 367na>        
nf(
--s href="+code=sbacksidesick" class="sref">dbacksidesick"/a>( &g; 1)." 368na>        9       
eturn ." 369na>        
s href="+code=sbacksidesick" class="sref">dbacksidesick"/a>( = a href="+code=Nbacksidespd" class="sref">cbacksidespd"/a>s.s href="+code=cparam class="sref">dparamna> .s href="+code=cntoervl" class="sref">cntoervl"na> ." 37ona> " 37ona>        
s href="+code=cer" class="sref">ser"na> = 1a href="+code=cu4pmmp  class="sref">cu4pmmp /a>s-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dgtotvalu" class="sref">fgtotvalu"/a>(
a href="+code=au4pmmp  class="sref">cu4pmmp /a>s, & a href="+code=Nmmp  class="sref">cemp /a>s." 372na>        
nf(
a href="+code=Ner" class="sref">ser"na> .{." 373na>        9       
a href="+code=crintk" class="sref">printk
/a>(
a href="+code=aKERN_WARNIN" class="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: U4 empehensors errort#37; d\nquot;" 374na>        9       
      
s href="+code=cer" class="sref">ser"na> ." 37ona>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HSENSO" class="sref">FAILURE_HSENSO"/a>s." 376na>#       
       
s href="+code=sf_controlo_stotmc" class="sref">cf_controlo_stotmc"/a>(
a href="+code=abacksidesans class="sref">dbacksidesansna>;.." 377na>        9       
eturn ." 378na>        9}" 379na>        
s href="+code=sspee" class="sref">cspee"/a>s= 1a href="+code=cf_cid_sru" class="sref">df_cid_sru"/a>(
#amp a href="+code=Nbacksidespd" class="sref">cbacksidespd"/a>s.1a href="+code=Nmmp  class="sref">cemp /a>s." 380na>        9a href="+code=NDBG_LOT" class="sref">NDBG_LOT"/a>(
apav class="string">"cbacksidePID lemp =#37; d.#37; .3d spee"=#37; d\nquot;" 381na>#       
       
 a href="+code=dAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..1a href="+code=Nspee" class="sref">cspee"/a>s." 382na> a href="drivers/macintosh/windfarm_pm11ioc#L9230" id24L633" class="line" nam.24L833">" 38ona>        
s href="+code=ser" class="sref">ser"na> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop"na> -gt;
/ href="+code=dstotvalu" class="sref">fstotvalu"/a>(
a href="+code=abacksidesans class="sref">dbacksidesansna>;.1a href="+code=Nspee" class="sref">cspee"/a>s." 384na>        9nf(
a href="+code=Ner" class="sref">ser"na> .{." 38ona>#       
       
s href="+code=spintk" class="sref">printk
/a>(
a href="+code=aKERN_WARNIN" class="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: backsidePans1errort#37; d\nquot;ser"na> ." 386na>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HANS class="sref">FAILURE_HANSna>;." 387na>        
}" 388na> }" 38ona> " 390na> spav class="somment">/* WDiver bay ans1/
/spav3." 39
/a>.tatic itruct 
a href="+code=wf_cid_sparam class="sref">df_cid_sparam/a>

a href="+code=wriver_bay_prm class="sref">driver_bay_prmna> = 1." 39ona>        
.s href="+code=cntoervl" class="sref">cntoervl"na>        = 5." 393na>        
.s href="+code=cistory _le" class="sref">distory _le"na>     = 2." 394na>        
.s href="+code=cg" class="sref">cgdna>#       
     = 30*lt; lt; 120." 395na>        
.s href="+code=cg  class="sref">cgpna>#       
     = 5*lt; lt; 120." 396na>        1.s href="+code=cg" class="sref">sgrna>#       
     = 0." 397na>        9.s href="+code=cntrget" class="sref">citrgetona>;= 
     = 40*lt; lt; 116." 398na>        9.s href="+code=caddi>
v" class="sref">faddi>
v"na>        = 1." 39ona> }."140ona> "140
/a>.tatic ivoid
s href="+code=sriver_bay_ans_ick" class="sref">driver_bay_ans_ick"/a>(
void."1402na> ."140ona>        
s href="+code=s32" class="sref">s32
/a> 
a href="+code=cmmp  class="sref">cemp /a>s.        9nt"
a href="+code=cspee" class="sref">cspee"/a>s."140ona>#       
nt"
a href="+code=cer" class="sref">ser"na> ."1406na>#"1407na>        
nf(
!s href="+code=sriver_bay_ans class="sref">driver_bay_ansna>; || !s href="+code=shdpmmp  class="sref">chdpmmp /a>s."1ers/macintosh/wilass="sref">cgpnavl" class="sref">cntoervl"na> ."1402n1spav3.s3d quot;" 360na>        9       
spav class="somment">/* Wfirst time;4  class="4ref">cemp /a>s..." 361na>#       
       
s href="+code=srintk" class="sref">printk
/a>(
a href="+code=aK930" id24Lclass="sref">LKERN_INFO/a>

apav class="ctring">"cindfarm_: Backside ontrolo lo4.24L131">41311na>#       
}df_c   9       
a href="+code=nbacksidesparam class="sref">dbac7 id24L145" class="line" nam.24L947">"1407na>ref">dmisna> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop7 id24L145" class="line" nam.24L947">"1407na>ss="ctring">"cindfarm_: Backside ontrolo lo4.ne" nam.2ef">cm_ax
/a> ...df_c   9       
a href="+code=cbacksidesparam class="sref">dbac7 id24L145" class="line" nam.24L947">"1407na>ref">dmisna> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop7 id24L145" class="line" nam.24L947">"1407na>ss="ctring">"cindfarm_: Backside ontrolo lo4.p  class=24L133">"1313na> " 364na>        9       
a hclass="srefde=cf_cid_sru" clclass="srefde" class="sref">fgtotvalu"/a href="+code=wf_cid_sparam class="sref">df_css="ctring">"cindfarm_: Backside ontrolo lo4." class="ratu
  c*
/spav3."1402n1spav3.;=-a20).cpu_aass4_mrget"na>;=-a20."1402n1spav3.ctrgetona>;."1erscpu_ clas4="sref">cpu_/a>s."1402n1spav3.( = a href="+code=Nbacksidespd" class="sref">cbacksidespd"/a>s.s href="+code=cparam class="sref">dparamna> .s href="+code=cntoervl"4" class="4ref">ctrgetona>;." 32ona> "="+code=sriver_bay_ans class="sre" class="sref">ser"na> = 1a href="+code=cu4pmmp  class="sref">cu4pmmp /a>s-gt;
/ href="+code=dop" class="sref">nop"na>="+code=sriver_bay_ans class="sreass="sref">fgtotvalu"/a>(
a href="+code=au4pmmp  class="sref">cu4pmmp /a>s, & a href="+code=Nm4ossibl cv4rtemp  */
/spav3." 384na>        9nf(
a href="+code=N4" class="4ref">cm_ax
/a> .." 38ona>#       
       
s href="+code=spintk" class="sref">printk
/a>(
a href="+code=aKERN_WAd30" id24LN" class="srLKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: ans14na>      4 9       
eturn ." 333na>        9       
       
    "cindfarm_: backsidePans1errort#37; d\nquot;" 32
/a>." 37ona>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HSENSO" class4ent">/* W4etoans r/
/spav3." 376na>#       
       
s href="+cod7 id24L145" class="line" nam.24L947">"1407na>ss="ctring">"cindfarm_: Backside ontrolo lo4e=ci clas4="sref">cn/a> .{."1ersde=Ni cla4s="sref">cn/a> ].NRULL/a>s." 379na>        
s href="+code=sspee" class="sref">cspee"/a>s= 1aclass="srefde=cf_cid_sru" clclass="srefde" clasef">fgtotvalu"/a>(
a href="+code=au4pmmp  class="sref">cu4pmmp /a>s, & a href="+code=Nm4 9       4       
ontrinue." 380na>        9a hrclass="sre=NDBG_LOT" class="sref">NDBG_LOT"/a>(
apav class="string">"cbacksidePID lemp =#37; d.#37; .3d 4lass="sre4">cn/a> ] / 100.." 381na>#       
       
 a href="+code=dAIX32TOPRINT class="sref">FAIX32TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..1a href="+code=Nspe4r" class=4sref">ser"na> .{."7 id24L145" class="line" nam.24L947">"1407na>ref">dmisna> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop"na>7 id24L145" class="line" nam.24L947">"1407na>class="sref">FAIX32TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..1a href="+code=Nspe4ra>      4"sref">ser"na> .." 384na>        9nf(
a href="+code=N4ss="sref"4FAILURE_HANSna>;." 38ona>#       
       
s href="+code=spintk" class="sref">printk
/a>(
a href="+code=aKERN_WAd30" id24Lss="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: backsidePans1errort#37; d\nquot;" 386na>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HANS cl4>" 336na>4       
       
}4 337na>        
}" 338na> }" 33ona> " 390na> spav class="somment"4 WBacksid4/U4 ans1/
/spav3." 390na> spav class="somment"4 " class=4idesparamna> = 1." 39
/a>.tatic itruct 
slots931" class="line" namslots931" cdf_cid_sparam/a>

a href="+code=wriver_bay_prm class="4f">cntoer4l"na>        = 5." 398na>        9.s href="+code=caddi>
v" class="sr4f">distor4 _le"na>     = 2." 393na>        
.s href="+code=cistory _le" class="sr4    
    4= 48*lt; lt; 120." 396na>        1.s href="+code=cg" class="sr4     
   4 = 5*lt; lt; 120." 396na>        1.s href="+code=cg" class="sr4 " 336na>4       
     = 0.        
.s href="+code=cistory _le" class="sr4 24L337">4= 64*lt; lt; 116." 6">" 396na>        1.s href="+code=cg" class="sr4 ne" nam.4v"na>        = 1." 396na>        1.s href="+code=cg" class="sr4ne" nam.24L439">" 34ona> }." 396na>        1.s href="+code=cg" class="sr4nWBacksid424L530">" 35ona> (
void." 352na> .drmp  class4"sref">cemp /a>s.

a href="+code=wriver_bay_prm class="4e" class=4sref">cspee"/a>s.ser"na> .        9nt"
a href="+code=cspeline" nam424L536">" 356na>#"140ona>#       
nt"
a href="+code= class="s4ef">cu4pmmp /a>s."140ona>#       
nt"
a href="+code= ne" nam.4 9       
eturn .        
nf(
!s hrefslots93 href="+code=cAIX32slots93 hre"sref">driver_bay_ansna>; || !s href="+code=shdpmmp sref">dba4ksidesick"/a>(.{."1ersnti>
aliz4 thing r/
/spav3." 384na>        9nf(
a href="+code=N4pitrarted4\nquot;" 360na>        9       
spav class="somment">/* Wfirst time;4="sref">d4acksidesansna>;.." 361na>#       
       
s href="+code=srintk" class="sref">printk
/a>(
a href="+code=aKSlots class="sref">LKERN_INFO/a>

apav class="ctring">"cindfarm_: Backside ontrolo lo4="sref">d4acksidesansna>;.." 364na>        9       
a hslots93de=cf_cid_sru" clslots93de"sreass="sref">fgtotvalu"/slots931" class="line" namslots931" cdf_css="ctring">"cindfarm_: Backside ontrolo lo4=" class=4ksidesparamna> ..dback4idesick"/a>( = 1.4 366na>#       
}( &g; 1)."slots93 href="+code=cAIX32slots93 hre"sre" class="sref">ser"na> = 1a href="+code=cu4pmmp  class="sref">cu4pmmp /a>s-gt;
/ href="+code=dop" class="sref">nop"na>slots93 href="+code=cAIX32slots93 hre"sreass="sref">fgtotvalu"/a href="+code=cAIX32TOPRINT cl 
       
s href="+code=sbacksidesick" class="s4ene" nam.4 9       
eturn ." 384na>        9nf(
a href="+code=N4class="sr4f">cntoervl"na> ." 38ona>#       
       
s href="+code=spintk" class="sref">printk
/a>(
a href="+code=aKERN_WAslots ="srefass="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: U4 empehensors 4line" nam424L730">" 37ona> cemp /a>s." 37ona>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HSENSO" class4r" class=4sref">ser"na> .{." 376na>#       
       
s href="+codslots91" ="line" nam.24Lslots91" 7na>l 
       
s href="+code=sbacksidesick" class="s4p"sref">d4d\nquot;"1erser" class4"sref">ser"na> .FA4LURE_HSENSO"/a>s." 379na>        
s href="+code=sspee" class="sref">cspee"/a>s= 1aslots93de=cf_cid_sru" clslots93de"sreasef">fgtotvalu"/a href="+code=cAIX32TOPRINT cl 
       
s href="+code=sbacksidesick" class="s4="sref">d4acksidesansna>;.." 380na>        9a hrslots =NDBTOPRIT" class="sref">NDBG_LOT"/a>(
apav class="string">"cbacksidePID lemp =#37; d.#37; .3d 4na>      4 9       
eturn ."1310na>        9       
   
s href="+code=spu_ class="sref">cpu_/a>s.1a href="+code=cAIX32TOPRINT class="sref">FAIX3232TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..1a href="+code=Nspe4.24L738">4 378na>        9}cemp /a>s."slots91" ="line" nam.24Lslots91" 7na>ref">dmisna> = 1a href="+code=cbacksidesans class="sref">dbacksidesansna>;-gt;
/ href="+code=dop" class="sref">nop"na>slots91" ="line" nam.24Lslots91" 7na>ass="sref">FAIX3232TOPRINT/a>(
a href="+code=ammp  class="sref">cemp /a>s..1a href="+code=Nspe4pee"=#37;4d\nquot;" 384na>        9nf(
a href="+code=N4" class="4ref">cspee"/a>s." 38ona>#       
       
s href="+code=spintk" class="sref">printk
/a>(
a href="+code=aKERN_WAslots ss="sref">LKERN_WARNIN"/a>

apav class="ctring">"cindfarm_: backsidePans1errort#37; d\nquot;" 382na> a href=4drive48s/macintosh/windfarm_pm11ioc#L730" id24L836" class="line" nam.24L836">" 386na>#       
       
s href="+code=sailure_state" class="sref">failure_stateona>; | 1a href="+code=dAILURE_HANS cl4" class="4ref">cspee"/a>s.ser"na> .{.FA4"sref">ser"na> .;.dr.24L837">4 387na>        
}" 384na>        9nf(
a href="+code=N4"24L738">44L13"">" 388na> }" 38ona> driver_bay_ansna>; || !s href="+code=shdpmmp ref">driv4r_bay_prmna> = 1." 376na>#       
       
s href="+codcpufreq_ansss="line" nam.24L13"freq_ansss"srefure_stateona>; | 1a href="+code=dAILURE_HANS cl4line" nam4l"na>        = 5." 326na>#       
orc((a href="+code=ci class="sref">cn/a> * 10 1a href="+code=ci class="sref">cn/a> *lt; 1a href="+code=cR_CPU_FAre_stateona>; | 1a href="+code=dAILURE_HANS cl4l class="4 _le"na>     = 2.cptna>;= 1a href="+code=Are_stateona>; | 1a href="+code=dAILURE_HANS cl4l" class=4= 30*lt; lt; 120." 376na>#       
       
s href="+codcpu      9       
s href="+code=Nc" class="sref">cptna>;= 1a href="+code=Aure_stateona>; | 1a href="+code=dAILURE_HANS cl4lsref">FA4 = 5*lt; lt; 120.cf_controre_stateona>; | 1a href="+code=dAILURE_HANS cl4ls="sref"4       
     = 0." 376na>#       
       
s href="+code=sf_controlo_stotmc" class="sref">cf_controlo_stotmc"/a>(
a href="+code=abacksidesans clas4>;= 
    4= 40*lt; lt; 116.lo_stotmc"/a>(
a href="+code=abacksidesans clas4>24L738">4v"na>        = 1." 376na>#       
       
s href="+codslots91" ="line" nam.24Lslots91" 7na>l 
       
s href="+code=sbacksidesick" class="s5ne" nam.25L13"">" 39ona> }."1407na>s
       
s href="+code=sbacksidesick" class="s5n1" nam.25Lay ans1/
/spav3." 376na>#       
       
s href="+cod7 id24L145" class="line" nam.24L947">"1407na>ss="ctring">"cindfarm_: Backside ontrolo lo5iver_bay_5ns_ick"/a>(
void."1402na> .     = 2.d5e" class=5sref">cspee"/a>s." 384na>        9nf(
a href="+code=N5cer" clas5="sref">ser"na> .;= 1a href="+codev class="ctring">;= e=L836">"na>;= 1a href=";= e=L836">"ans_ure_stateona>; | 1a href="+code=dAILURE_HANS cl5line" nam524L946">"1406na>#chdpmmp /a>s." 384na>        9nf(
a href="+code=N5/macintos5/wilass="sref">cgpnavl" 5lass=509/macintosh/windfarm_pm11ioc#L93"" isKERN_If="+code=cAIX32sKERN_Iine"     
       
s href="+code=sbacksidesick" class="s5" id8ef">53d quot;" 361na>#       
       
s href="+code=srintk" class="sref">printk
/a>(
a href="+code=aKe=cs class="sref"s>LKERN_INFO/a>

apav class="ctring">"cindfarm_: Backside ontrolo lo5  class="5ref">cemp /a>s..." 326na>#       
orc((a href="+code=ci class="snr 37re  9       
s hrenr 37re ss="sref">cn/a> *lt; 1a href="+code=cR_CPU_FAnam.24L834">" 384na>        9nf(
a href="+code=N5.24L131">51311na>#       
}" 361na>#     href="+code=cR_CPU_FAnf="+c0Anam.24L834">" 384na>        9nf(
a href="+code=N5.ne" nam.5ef">cm_ax
/a> ..." 386na>#      
       
s href="+codePERMilure_state" class="srePERMans_ure_stateona>; | 1a href="+code=dAILURE_HANS cl5.p  class524L133">"1313na> "cindfarm_: Backside ontrolo lo5 " class=5ratu
  c*
/spav3."cindfarm_: Backside ontrolo lo5 er" clas5mrget"na>;=-a20).cpu_aass5_mrget"na>;=-a20.class="s5ref">ctrgetona>;." 380na>        9a hrf="+all_t  
T" class="sre03_WARNIN"/a>

apav class="ctring">    9       
   
s href="+code=spu_ class="sref">cpu_/a>s.1f="+all_t  
 9       
s href="+all_t  
PU_FAss="ctring">"cindfarm_: Backside ontrolo lo5 macintos5="sref">cpu_/a>s.ctrgetona>;.HACKED_OVERTEMP 9       
s hreHACKED_OVERTEMP/macintosh/windfarm_pm11ioc#L933" id24L139" class=5" class="524L230">" 32ona>         s="ctring">"cindfarm_: Backside ontrolo lo5ossibl cv5rtemp  */
/spav3."cindfarm_: Backside ontrolo lo5one" nam.5ref">cm_ax
/a> ..      5 9       
eturn ." 32
/a>.", b836 outna>        9       
spav class="somment">/* Wfirst time;5ent">/* W5etoans r/
/spav3." 386na>#   sref"  
       
s href="+codePERMilure_state" class="srePERMans_ href="+code=sriver_bay_ans_ick" class="sref">d5e=ci clas5="sref">cn/a> .{."1er5de=Ni cla5s="sref">cn/a> ]." bits exceptsrew o45"N" clwhich will be evm11ually        9       
spav class="somment">/* Wfirst time;5emacintos5"sref">NRULL/a>s.itself        9       
spav class="somment">/* Wfirst time;5 9       5       
ontrinue.        9       
spav class="somment">/* Wfirst time;5lass="sre5">cn/a> ] / 100.."na>;= 1a href=";= e=L836">"ans_    
       
s hred24L836" class="line" nam.24L836">" 386na>#  c#L94"8 id24L145" class="line" nam.24L948">"1er5r" class=5sref">ser"na> .{." 386na>#   sref"   
       
s href="+codeLOW_OVERTEMP 9       
s href="+codeLOW_OVERTEMP>#  c#L94"8 id24L145" class="line" nam.24L948">"1er5rne" nam.5rts quot;"cindfarm_: Backside ontrolo lo5ra>      5"sref">ser"na> .."cindfarm_: Backside ontrolo lo5r" class=5FAILURE_HANSna>;."cindfarm_: Backside ontrolo lo5rnt">/* W5  
       
break."140class="line" nam.24L141">"140
/a>.tatic ivoss="ctring">"cindfarm_: Backside ontrolo lo5r=ci clas5       
       
}5 337na>        
}" 380na>        9a hr;= e=L836">": 0x="srex, L836">" 386na:>LKERNx
apav class="string">"cbacksidePID lemp =#37; d.#37; .3d 5ine" nam.54L338">" 338na> }"na>;= 1a href=";= e=L836">"ans_v class="ctring">d24L836" class="line" nam.24L836">" 386na>#  ss="ctring">"cindfarm_: Backside ontrolo lo5line" nam524L339">" 33ona> "s. Any L836">" causes 13"freq ansss   _*>        9       
spav class="somment">/* Wfirst time;5 " class=5idesparamna> = 1." 386na>#   sref"sref"  
       
s hre;= e=L836">"na>;= 1a href=";= e=L836">"ans_  = 0 sref"sref"  
       
s hrecpufreq_ansss="line" nam.24L13"freq_ansss"sref">driver_bay_ansna>; || !s href="+code=shdpmmp5f">cntoer5l"na>        = 5." 376na>#       
       
s href="+codcpufreq_ansss="line" nam.24L13"freq_ansss"srefure_stateona>; | 1a href="+code=dAILURE_HANS cl5f">distor5 _le"na>     = 2." 386na>#    = 0 sref"sref"  
       
s hre;= e=L836">"na>;= 1a href=";= e=L836">"ans_ sref"sref"  
       
s hrecpufreq_ansss="line" nam.24L13"freq_ansss"sref">driver_bay_ansna>; || !s href="+code=shdpmmp5f" class=5= 48*lt; lt; 120." 376na>#      f="+code=nbacksid>" 376na>#      f=       
s href="+codcpufreq_ansss="line" nam.24L13"freq_ansss"srefure_stateona>; | 1a href="+code=dAILURE_HANS cl5fnt">/* W5 = 5*lt; lt; 120.5       
     = 0.it_indfnow, we might wantm.24deal with othldfL836">"s        9       
spav class="somment">/* Wfirst time;5 24L337">5= 64*lt; lt; 116." though        9       
spav class="somment">/* Wfirst time;5 ne" nam.5v"na>        = 1.        9       
spav class="somment">/* Wfirst time;5ne" nam.25L439">" 34ona> }." 35ona> (
void.#="line" nam.24L"linecnew 376na>#     windfarm_pm11ioc#L131" id376na>#="line" nam.24L id376na>#/maci*  
s href="+codclass="line" nam.ct"sref">driver_bay_ansna>; || !s href="+code=shdpmmp5ine" nam.54L532">" 352na> ." 384na>        9nf(
a href="+code=N5mp  class5"sref">cemp /a>s.;= 1a href="+codev class="ctring">  
_exhauslass="line" nam.  
_exhausl>#  c#L94"8 id24L145" class="line" nam.24L948">"1er5e" class=5sref">cspee"/a>s."1er5ent">/* W5="sref">ser"na> .dbacksid" 380na>        9a hrf="freq-ansss/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N5line" nam524L536">" 356na>##="line" nam.24L idode=376na>#       
s href="+codclass="line" nam.ct"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp5i24L337">5ef">cu4pmmp /a>s."1er5ene" nam.5 9       
eturn .dba5ksidesick"/a>(.{.
aliz5 thing r/
/spav3." 326na>#       
orc((a href="+code=ci class="sref">cn/a> * 10 1a href="+code=ci class="sref">cn/a> *lt; 1a href="+code=cR_CPU_FAnam.24L834">" 384na>        9nf(
a href="+code=N5pitrarted5\nquot;dbacksidcptna>;= 1a href="+code=AAnam.24L834">" 384na>        9nf(
a href="+code=N5pne" nam.5acksidesansna>;..cptna>;= 1a href="+code=  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=376na>#="line" nam.24L idode=376na>#       
s href="+codclass="line" nam.ct"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp5="sref">d5acksidesansna>;..cptna>;= 1a href="+code=  _pm11ioc#L93"" iclass="line" nam.ct"srec#L94"8 id24L145" class="line" nam.24L948">"1er5=" class=5ksidesparamna> .."cindfarm_: Backside ontrolo lo5ef">dback5idesick"/a>( = 1.#       
}( &g; 1).#       
orc((a hrefss== rm_pm11ioc#L923Nef">cn/a> * 10 1a href="+code=ci class="Anam.24L834">" 384na>        9nf(
a href="+code=N5pne" nam.5 9       
eturn .        9       
spav class="somment">/* Wfirst time;5class="sr5f">cntoervl"na> .dbacksid" 380na>        9a hr" nam.24-ss=/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N5line" nam524L730">" 37ona> cf_contr  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=376na>#="line" nam.24L idode=376na>#       
s href="+codclass="line" nam.ct"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp5p  class=5sref">cemp /a>s.cf_contr  _pm11ioc#L93"" iclass="line" nam.ct"srec#L94"8 id24L145" class="line" nam.24L948">"1er5r" class=5sref">ser"na> .{.dbacksid" 380na>        9a hrslots-ss=/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N5l"sref">d5d\nquot;  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=376na>#="line" nam.24L idode=376na>#       
s href="+codclass="line" nam.ct"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp5p" class=5"sref">ser"na> .  _pm11ioc#L93"" iclass="line" nam.ct"srec#L94"8 id24L145" class="line" nam.24L948">"1er5rf">dback5LURE_HSENSO"/a>s.dbacksid" 380na>        9a hr4L145-bay-ss=/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N5line" nam5acksidesansna>;.."1407na>  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=376na>#="line" nam.24L idode=376na>#       
s href="+codclass="line" nam.ct"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp5pclass="s5 9       
eturn ."1407na>  _pm11ioc#L93"" iclass="line" nam.ct"srec#L94"8 id24L145" class="line" nam.24L948">"1er5rne" nam.5 378na>        9}cemp /a>s."1er5pee"=#37;5d\nquot;cspee"/a>s." 382na> a href=5drive58s/macintosh/windfarm_pm11ioc#L1306 id24L136" class="line" nam.24L236">" 326na>#       
orc((a href="+code=ci class="se=ci cla_REQDa>#       
orc(e=ci cla_REQDss="sref">cn/a> *lt; 1a href="+code=cR_CPU_FAntosh/windfarm_pm11ioc#L9230" id24L732" class=5l"sref">d5ref">cspee"/a>s.cptna>;= 1a href="+code=  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_Antosh/windfarm_pm11ioc#L9230" id24L732" class=5l" class=5sref">ser"na> .{."1er5pf">dback5"sref">ser"na> .;.        9       
spav class="somment">/* Wfirst time;5.24L837">5 387na>        
}#    _pm11ioc#L93"" icpu      9       
s href="+code=Nc" 0]" class="sref">ser"na> = 1a href="+code=cu4pmmp  class="sref">cu4pmmp"line" nam.24L736"g     
       
s href="+codcpu      9       
s href="+code=Nc" 0=Aure_stateona>; | 1a href="+code=dAILURE_HANS cl5"24L738">54L13"">" 388na> }" 326na>#       
orc((a href="+e"rm_pm11ioc#L130LAST_PUMP 9       
s hreLAST_PUMPss="sref">cn/a> *lt; 1a href="+code=cR_CPU_FAntosh/windfarm_pm11ioc#L9230" id24L732" class=5line" nam524L839">" 38ona> cptna>;= 1a href="+code=A != rm_pm11ioc#L923NULL="line" nam.24LNULLans_Antosh/windfarm_pm11ioc#L9230" id24L732" class=5/* WDiver5bay ans1/
/spav3.cptna>;= 1a href="+code=  ntosh/windfarm_pm11ioc#L9230" id24L732" class=5/  class=5r_bay_prmna> = 1.dbacksida> = 1a href="+code=cu4pmmp  class="sref">cu4pmmp"line" nam.24L736"g     
       
s href="+codclass="line" nam.ct"sre) * 100 / class="ctring">  
_exhauslass="line" nam.  
_exhausl>#  c#L94"8 id24L145" class="line" nam.24L948">"1er5line" nam5l"na>        = 5.     = 2.# "sre  _  
       
s href="+code=sbacksidesick" class="s5l" class=5= 30*lt; lt; 120.FA5 = 5*lt; lt; 120.driver_bay_ansna>; || !s href="+code=shdpmmp5>;= 
    5= 40*lt; lt; 116." 384na>        9nf(
a href="+code=N5>24L738">5v"na>        = 1." 39ona> }.dbacksid" 380na>        9a hrf="-N" c-RNIN"/a>

apav 9sAnam.24L834">" 384na>        9nf(
a href="+code=N6iver_bay_6ns_ick"/a>(
void.dbacksid" 380na>        KE9;0 KE9;a>

apaure_stateona>; | 1a href="+code=dAILURE_HANS cl6n3er_bay_6n"na>        = 5.dbacksid#       
orc((a href="+code=ci class="sref"ORE * 10 1a href="+codeORE ans_ sref"sref"re_stateona>; | 1a href="+code=dAILURE_HANS cl6n4er_bay_6n_le"na>     = 2.cptna>;= 1a href="+code=  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=ass="s= 1a href="+cod idode=ass="s       
s href="+codsef="+code=cAIX32se"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp6e" class=6sref">cspee"/a>s.cptna>;= 1a href="+code=  "rm_pm11ioc#L130sef="+code=cAIX32se"sre"re_stateona>; | 1a href="+code=dAILURE_HANS cl6n6 class=6s= 5*lt; lt; 120."1406na>#dbacksid" 380na>        9a hrf="-TOPRI-RNIN"/a>

apav 10sAnam.24L834">" 384na>        9nf(
a href="+code=N6i8ne" nam62 40*lt; lt; 116.dbacksid" 380na>        KE9;0 KE9;a>

apaure_stateona>; | 1a href="+code=dAILURE_HANS cl6n9ne" nam62"na>        = 1.dbacksid#       
orc((a href="+code=ci class="sref"ORE * 10 1a href="+codeORE ans_ sref"sref"re_stateona>; | 1a href="+code=dAILURE_HANS cl6" id8ef">63d quot;cptna>;= 1a href="+code=  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=ass="s= 1a href="+cod idode=ass="s       
s href="+codsef="+code=cAIX32se"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp6  class="6ref">cemp /a>s...cptna>;= 1a href="+code=  "rm_pm11ioc#L130sef="+code=cAIX32se"sre"re_stateona>; | 1a href="+code=dAILURE_HANS cl6.24L131">61311na>#       
}dbacksid" 380na>        9a hrhd-N" c/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N6.ne" nam.6ef">cm_ax
/a> ...  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ sref"sref" rm_pm11ioc#L923 idode=ass="s= 1a href="+cod idode=ass="s       
s href="+codsef="+code=cAIX32se"sre)  = 0f">driver_bay_ansna>; || !s href="+code=shdpmmp6 4er_bay_624L133">"1313na>   "rm_pm11ioc#L130sef="+code=cAIX32se"sre"re_stateona>; | 1a href="+code=dAILURE_HANS cl6." class=6ratu
  c*
/spav3.dbacksid" 380na>        9a hrslots-3 hre/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N6.6 class=6mrget"na>;=-a20).driver_bay_ansna>; || !s href="+code=shdpmmp6 ine" nam6_mrget"na>;=-a20.; | 1a href="+code=dAILURE_HANS cl6.8ne" nam6ref">ctrgetona>;.dbacksid" 380na>        9a hr" nam.24-N" c/a>

apav clasAnam.24L834">" 384na>        9nf(
a href="+code=N6.9ne" nam6="sref">cpu_/a>s.driver_bay_ansna>; || !s href="+code=shdpmmp6" class="6ref">ctrgetona>;.; | 1a href="+code=dAILURE_HANS cl6" class="624L230">" 32ona> ; | 1a href="+code=dAILURE_HANS cl6"24L131">6rtemp  */
/spav3."1er6one" nam.6ref">cm_ax
/a> ..      6 9       
eturn ./* Wfirst time;6n" class=624L234">" 32
/a>." 326na>#       
orc((a href="+code=ci class="snr 37re  9       
s hrenr 37re ss="sref">cn/a> *lt; 1a href="+code=cR_CPU_FA 9       
spav class="somment">/* Wfirst time;6n6 class=6etoans r/
/spav3.cptna>;= 1a href="+code=  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_ ||_pm11ioc#L93"" isss=_f="+3 href="+code=cAIX32sss=_f="+3 hre=Nc" class="sref">cptna>;= 1a href="+code=  = rm_pm11ioc#L923NULL="line" nam.24LNULLans_A 9       
spav class="somment">/* Wfirst time;6nine" nam6="sref">cn/a> .{."1er6o8ne" nam6s="sref">cn/a> ]."1er6o9ne" nam6"sref">NRULL/a>s.cn/a> ] / 100..ser"na> .{."cbacksidePID lemp =#37; d.#37; .3d 6rne" nam.6rts quot;&vm11f="+code=cAIX32&vm11codev windf*  
s href="+coddataf="+code=cAIX32dataans_A 9       
spav class="somment">/* Wfirst time;6ra>      6"sref">ser"na> .." 384na>        9nf(
a href="+code=N6r" class=6FAILURE_HANSna>;." 384na>        9nf(
a href="+code=N6rnt">/* W6  
       
break." 384na>        9nf(
a href="+code=N6rine" nam6       
       
}        
}"cindfarm_: Backside ontrolo lo6ine" nam.64L338">" 338na> }" 384na>        9nf(
a href="+code=N6line" nam624L339">" 33ona> #="line" nam.24L"linecnew 376na>#       
s href="+coddataf="+code=cAIX32dataans_A 
       
s href="+code=sbacksidesick" class="s6 WBacksid6/U4 ans1/
/spav3."cindfarm_: Backside ontrolo lo6 " class=6idesparamna> = 1." 384na>        9nf(
a href="+code=N6lne" nam.6l"na>        = 5.# = 1a href="+codhaL94all_376na># "sre sref"sref" rm_pm11ioc#L923haL94all_ass="ss= 1a href="+codhaL94all_ass="ss"sreA 9       
spav class="somment">/* Wfirst time;6f">distor6 _le"na>     = 2./* W6 = 5*lt; lt; 120."1er6 ne" nam.6v"na>        = 1." 384na>        9nf(
a href="+code=N6ne" nam.26L439">" 34ona> }."cbacksidePID lemp =#37; d.#37; .3d 6nWBacksid624L530">" 35ona> (
void." 352na> ./* Wfirst time;6mp  class6"sref">cemp /a>s."1er6 ne"fstg">&li>/* W6  
       
br6 ne"fstg">&li>/*s hre 
spa       9nf(
a href="+code=N6ne" nam.26L439">" 34ona> }.#="line" nam.24L ido6e=37665a href6"driv64s/mac#L94"8 id24L145" class="line" nam.3"" icpuf6eq_ansss="line" nam.24L16"freq65 href6"driv64s/macintosh/windfarm_pm11ioc#L131"notifL13"" cla6s="line" na5sref">dba5ks6desic659dfarm_pm11ioc#L131"platfoL73devich 9   remov
s hreplatfoL73devich"sreremov
s href="+coddevf="+code=cAIX32dev"sreA 9       
spav class="somment">/* Wfirst time;6mp  class6"sref">cemp /a>s.
aliz5 thing r/
/6pav3.6a href1ioc#Lnot aKe=c ss=, eL923e=m.ref5"driv57s/macinL136" cla6s="line" nam.24L236">" 366na>#66  
s hred24L836" class="lineeviunne"fstg">&li>/* W6  
       
br6 unne"fstg">&li>/*s hre 
spa       9nf(
a href="+code=N6ne" nam.26L439">" 34ona> }.should 0.lea>  " cl624L234"and  5       
}&qu6t;cindfarm_: Backside on6rolo 66 href5"driv55s/macintosh/windfrm_pm11ioc#L923cpufre63"6 id24L63"" class="line" na5sine6 nam56366na>m11ioc#L923"linec&vm11s= 1a hs="sommentacint     
spav class="sommentacint4na>        9nf(
a hevich"sretacint     
spav clasevich"sretacint.6 &g; 1). * 10 1a inec idnotify= 1remov
s hreplatfoL73dremov
s hracksidePID lemp =#vich 9   remov
s hreplatfoL73devich"sreremov
s hrf6"driv6rs/mac}nndfarm_pm11ioc#L93"6 id24L13"" c 13"" cla6 aKe=c ss=, try4thlaothl60na> 6      9       inec idnotify= 1tacint     
spav clastacint." 384na>    acks"ctring">"cindfarm_: Backside38na> }cf_contr  = rm_pm11inec idnotify= 1ownnt     
spav clasownnt>cf_cocksidePID lemp =#THIS_MODULE     
spav clasTHIS_MODULEs hrf6"driv6rs/mac}nndfarm_pm11ioc#L93"6 id24L13"" c11ioc#L936" ie=sf_controlo_stotmc"6class6"sref">cf_cont}f6"driv6rs/mac}nndfarm_pm11ioc#L93"6 id24L13"" c1ioc#L9236Krcss="line" nam.24LsKrc6s    6  
s hef6"driv65/macintosh/windfarm_pm11ioc#L9230" id241ioc#L9236lots91" ="line" nam.24Ls6ots9167 href5"driv52/macintosh/wiintosh/windfarm_pm11ioc#L6_pm11ioc#6923slots91" ="line" nam.64Lslo6s91" 7m_pm11ioc#L131"platfoL73de__ini* W6  
       
b__ini*4na>        9nf(
a hevich"sreini* W6  
       
bevich"sreini*s hre* Wff6"driv65tosh/windfarm_pm11ioc#L131"notifier_blo1ioc#L9336Krcss="line" nam.24LsKrc6s    6  
s hf6"driv65s/macintosh/w.m_pm11ioc#L131"notifier_c3337" cla6 id24L145" class="line" 6am.246947">"1407na> L923"linec&vm11s= 1a ht">/* _n1a sref">cemp /a>s.cemp /a>scpu href6"driv62s/macintosh/wi elsere_stateona>; | 1a h_pm11ioc#69237 id24L145" class="li6e" na67 href6"driv64s/macintosh/windfarm_pm11ioc#L131"notif37" id24L637" class="line" na5p  c6ass=56ref">cemp /a>sX32se"srelass="sref"of_h/whine_is_s="ppm1bindfarm_pm11ioc#Lof_h/whine_is_s="ppm1binsick" "ctring">"cindfarm_: P24LNMac11,2>cpu_/a>s."1e65pee"6#37;5d\nquot;; | 1a hL337" cla6s="line" na5p  class=5re6">csp68 href6"driv63s/macintosh/indfarm_pm11ioc#L94"linec iL732" cla6s=5line" nam524L832">" 362na> 68f="+codclass=   
spav class="somment">Coue;5 he number ofclass/* Wf 
}" 366na>#6      
orc((a =cR_CPU_FA 9       
spav class="somment">/* Wfirsts hre5"driv58s/macintosh/wndfarm_pm11ioc#  
_exhaus6Lioc#L92369       
s href="+code=N6" cla68  _  
       
s href="+code=omm_e/wh_n1a _by_typndfarm_pm11ioc#Lomm_e/wh_n1a _by_typnsick" class="s6 WBaccpusref">cemp /a>scpu hre     9nf(
a href="+code=N6i8ne" >cpu_/a>s."6er5pf">dback5"sref">seime;6n6 class=6et    
spav class="somment">/* Wfirst 5"driv58s/macintosh/wndfarm_pm11ioc#  
_exhaus6Lioc#L9336s=5ss="sref"5FAILURE_HAN6na>;.6a href5"driv58s/macintosh/wintosh/windfarm_pm11ioc#L6ork outnp6 clacal   _factod0na>   6    96      
spav claec idnotify= 1  int" class=6= 48*lt; int"sick" class="s6 WBacKERN_INFO class=6= 48*ltKERN_INFO4na>  "ctring">"cindfarm_: Backside: ini*ializ7na> or dual-/* W desktop G5 338na> }"cindfarm_: _pm11ioc#smuss="ss"sr38na> }"cindfarm_: _pm11ioc#smus624L23438na> }dbacksi36" class="linerequest_moduindfarm_pm11ioc#Lrequest_moduinsick" "ctring">"cindfarm_: _pm11ioc#smus6at38na> }   6 = 2.69     
orc((a =cR_CPU_FA 9   request_moduindfarm_pm11ioc#Lrequest_moduinsick" "ctring">"cindfarm_: _pm11ioc#lm75s624L2338na> }"cindfarm_: _pm11ioc#max66 is624L2338na> }FA5 = 5*lt; l6; 12069class="line" nam.24L948">"1erequest_moduindfarm_pm11ioc#Lrequest_moduinsick" "ctring">"cindfarm_: _pm11ioc#="line" nam.238na> }MODULE 
}5v"na>     6  = 169 href6"driv64s/macintosh/windfarm_pm11ioc#L131"notif94href="+6ode=cpu_aans_ure_stateon6>; | 69_  
       
s href="+code=sbs="sommentacint ne"fstg"     
spav class="sommentacint ne"fstg"s hre 
spa       9nf(
a hevich"sretacint     
spav clasevich"sretacint.        9nf(
a hevich"sreexi* W6  
       
bevich"sreexi*s hre* Wff6"driv65tosh/windfarm_pm11ioc#L131"notifier_bl73sss=_f="7N" cf="+code=cAIX32sss=_7="+N"70m_pm11ioc#Lnot aKe=c ss=, eL923e=m.ref5"driv57s/maci73"" isss=7f="+N" cf="+code=cAIX32s7s=_f=70class="line" nam.24L948">"1es="sommentacint unne"fstg"     
spav class="sommentacint unne"fstg"s hre 
spa       9nf(
a hevich"sretacint     
spav clasevich"sretacint.#7a hreff6"driv64s/mac#L94"8 id24L145" class="line" nam7d7" isss=7f1a href="+cod"linecnew 7  
s 7ref="+6"driv64s/mac#L94"8 id24L145" class="line" nam7d8" isss=7f=N5>24L738">5v"na>     70sef=7+code=       9nf(
a hmoduineini* W6  
       
bmoduineini*sick" class="s6 WBacevich"sreini* W6  
       
bevich"sreini*s href6"driv64s/macintosh/windfarm_pm11ioc#L93"6 id27L9" isss=7fde=cpu_aans_ure_stateon7>dbac7sid"cindfarm_: Paul Mackerras"+codpaulus@samba.org24-N38na> }"cindfarm_: Thermal  5     > or P24LNMac11,2>cpu_/a>s.7 = rm7pm11ioaec idnotify= 1MODULE_LICENSE     
spav clasMODULE_LICENSEsick" "ctring">"cindfarm_: GPL>cpu_/a>s.  7rm_pm1aec idnotify= 1MODULE_ALIAS cl6" id8ef">63MODULE_ALIASsick" "ctring">"cindfarm_: s="somme:Backside38na> }
Ttoerriginal LXR software b>cntoe"driv64s/http://sourceommge.net/projects/lx" >LXR s="suni*a hrefcntis experisommal intoion b>c"driv64s/mailto:lx"@LsKux.no">lx"@LsKux.no hre.
lx".LsKux.no kpm1ly hostgd b>c"driv64s/http://www.redpill-LsKpro.no">Redpill LsKpro ASsick, provider ofcLsKux 5 sult7na>and operpm15 s sera/* s since 1995.