--- linux-2.6.11.orig/arch/ppc/Kconfig 2005-03-02 08:38:33.000000000 +0100 +++ linux-2.6.11_nico/arch/ppc/Kconfig 2005-03-04 15:52:54.784745784 +0100 @@ -182,6 +182,24 @@ If in doubt, say N here. +config TAU_CALIBRATED + bool "The CPU sensor has been calibrated." + depends on TAU + help + Enable it you got the real temperature with an external sensor + and you know the offset between the one advertised by the CPU + and the real one + +config TAU_CALIBRATED_VALUE + int "Offset of the themal sensor" + depends on TAU_CALIBRATED + default "0" + help + This is the offset of the thermal sensor compare to the real value + For example, if you get 27°C in /proc/cpuinfo (uncalibrated) and + you know real one is 53°C, then you should set 26 as offset. + value = Real val - CPU val; + config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E500 --- linux-2.6.11.orig/arch/ppc/kernel/setup.c 2005-03-02 08:38:26.000000000 +0100 +++ linux-2.6.11_nico/arch/ppc/kernel/setup.c 2005-03-04 15:55:57.649946048 +0100 @@ -198,17 +198,25 @@ #ifdef CONFIG_TAU if (cur_cpu_spec[i]->cpu_features & CPU_FTR_TAU) { +#ifdef CONFIG_TAU_CALIBRATED + int is_calibrated = 1; + int temp_offset = CONFIG_TAU_CALIBRATED_VALUE; +#else + int is_calibrated = 0; + int temp_offset = 0; +#endif #ifdef CONFIG_TAU_AVERAGE /* more straightforward, but potentially misleading */ - seq_printf(m, "temperature \t: %u C (uncalibrated)\n", - cpu_temp(i)); + seq_printf(m, "temperature \t: %u C %s- average\n", + cpu_temp(i) + temp_offset, is_calibrated ? "" : "(uncalibrated) " ); #else /* show the actual temp sensor range */ u32 temp; temp = cpu_temp_both(i); - seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n", - temp & 0xff, temp >> 16); -#endif + seq_printf(m, "temperature \t: %u-%u C %s\n", + (temp & 0xff) + temp_offset, (temp >> 16) + temp_offset, is_calibrated ? "" : "(uncalibrated)" ); + +#endif /* CONFIG_TAU_AVERAGE */ } #endif /* CONFIG_TAU */ @@ -486,7 +494,7 @@ { struct device_node *prom_stdout; char *name; - int offset; + int offset = 0; if (of_stdout_device == NULL) return -ENODEV;