diff options
author | Zhang Rui <rui.zhang@intel.com> | 2008-01-17 02:51:23 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-01 23:18:19 -0500 |
commit | d9460fd227ed2ce52941b6a12ad4de05c195f6aa (patch) | |
tree | 1fb877cf41c8599e0fc9c1fbf902b88baba60708 /include/acpi/processor.h | |
parent | 05a83d972293f39a66bc2aa409a5e7996bba585d (diff) |
ACPI: register ACPI Processor as generic thermal cooling device
Register ACPI processor as thermal cooling devices.
A combination of processor T-state and P-state are used for thermal throttling.
the processor will reduce the frequency first and then set the T-state.
we use cpufreq_thermal_reduction_pctg to calculate the cpufreq limit,
and call cpufreq_verify_with_limit to set the cpufreq limit.
if cpufreq driver is loaded, then we have four cooling state for cpufreq control.
cooling state 0: cpufreq limit == max_freq
cooling state 1: cpufreq limit == max_freq * 80%
cooling state 2: cpufreq limit == max_freq * 60%
cooling state 3: cpufreq limit == max_freq * 40%
after the cpufreq limit is set to 40 percentage of the max_freq,
we use T-state for cooling.
eg. a processor has P-state support, and it has 8 T-state (T0-T7),
the max_state of the proceesor is 10:
state cpufreq-limit T-state
0: max_freq T0
1: max_freq * 80% T0
2: max_freq * 60% T0
3: max_freq * 40% T0
4: max_freq * 40% T1
5: max_freq * 40% T2
6: max_freq * 40% T3
7: max_freq * 40% T4
8: max_freq * 40% T5
9: max_freq * 40% T6
10: max_freq * 40% T7
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/processor.h')
-rw-r--r-- | include/acpi/processor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 76411b1fc4fd..0787635a11aa 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/cpu.h> | 5 | #include <linux/cpu.h> |
6 | #include <linux/cpuidle.h> | 6 | #include <linux/cpuidle.h> |
7 | 7 | #include <linux/thermal.h> | |
8 | #include <asm/acpi.h> | 8 | #include <asm/acpi.h> |
9 | 9 | ||
10 | #define ACPI_PROCESSOR_BUSY_METRIC 10 | 10 | #define ACPI_PROCESSOR_BUSY_METRIC 10 |
@@ -218,7 +218,7 @@ struct acpi_processor { | |||
218 | struct acpi_processor_performance *performance; | 218 | struct acpi_processor_performance *performance; |
219 | struct acpi_processor_throttling throttling; | 219 | struct acpi_processor_throttling throttling; |
220 | struct acpi_processor_limit limit; | 220 | struct acpi_processor_limit limit; |
221 | 221 | struct thermal_cooling_device *cdev; | |
222 | /* the _PDC objects for this processor, if any */ | 222 | /* the _PDC objects for this processor, if any */ |
223 | struct acpi_object_list *pdc; | 223 | struct acpi_object_list *pdc; |
224 | }; | 224 | }; |
@@ -330,7 +330,7 @@ extern struct cpuidle_driver acpi_idle_driver; | |||
330 | /* in processor_thermal.c */ | 330 | /* in processor_thermal.c */ |
331 | int acpi_processor_get_limit_info(struct acpi_processor *pr); | 331 | int acpi_processor_get_limit_info(struct acpi_processor *pr); |
332 | extern struct file_operations acpi_processor_limit_fops; | 332 | extern struct file_operations acpi_processor_limit_fops; |
333 | 333 | extern struct thermal_cooling_device_ops processor_cooling_ops; | |
334 | #ifdef CONFIG_CPU_FREQ | 334 | #ifdef CONFIG_CPU_FREQ |
335 | void acpi_thermal_cpufreq_init(void); | 335 | void acpi_thermal_cpufreq_init(void); |
336 | void acpi_thermal_cpufreq_exit(void); | 336 | void acpi_thermal_cpufreq_exit(void); |