/* TODO: put these in a /proc interface, with some sanity checks, and maybe
* dynamic adjustment to minimize # of interrupts */ /* configurable values for step size and how much to expand the window when
* we get an interrupt. These are based on the limit that was out of range */ #define step_size 2/* step size when temp goes out of range */ #define window_expand 1/* expand the window by this much */ /* configurable values for shrinking the window */ #define shrink_timer 2000/* period between shrinking the window */ #define min_window 2/* minimum window size, degrees C */
/* if both thresholds are crossed, the step_sizes cancel out
* and the window winds up getting expanded twice. */
thrm = mfspr(SPRN_THRM1); if ((thrm & bits) == bits) {
mtspr(SPRN_THRM1, 0);
staticvoid tau_work_func(struct work_struct *work)
{
msleep(shrink_timer);
on_each_cpu(tau_timeout, NULL, 0); /* schedule ourselves to be run again */
queue_work(tau_workq, work);
}
staticvoid __init TAU_init_smp(void *info)
{ unsignedlong cpu = smp_processor_id();
/* set these to a reasonable value and let the timer shrink the
* window */
tau[cpu].low = 5;
tau[cpu].high = 120;
set_thresholds(cpu);
}
staticint __init TAU_init(void)
{ /* We assume in SMP that if one CPU has TAU support, they *allhaveit--BenH
*/ if (!cpu_has_feature(CPU_FTR_TAU)) {
printk("Thermal assist unit not available\n");
tau_initialized = 0; return1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.