linux/drivers/acpi
Zhang Rui d9460fd227 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>
2008-02-01 23:18:19 -05:00
..
dispatcher ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference 2007-12-02 14:26:55 -05:00
events ACPICA: fix acpi_serialize hang regression 2008-01-10 23:04:10 -05:00
executer ACPICA: Lindent 2007-05-09 23:34:35 -04:00
hardware Pull acpica into test branch 2007-10-10 01:00:45 -04:00
namespace ACPI: Fix a warning of discarding qualifiers from pointer target type 2007-08-25 01:38:40 -04:00
parser ACPICA: Lindent 2007-05-09 23:34:35 -04:00
resources fix compilation with gcc 4.2 2007-08-11 15:47:42 -07:00
sleep Pull alexey-fixes into release branch 2007-10-29 17:30:21 -04:00
tables ACPI: Add missing spaces to printk format 2007-11-19 21:53:32 -05:00
utilities ACPI: add dump_stack() to trace acpi_format_exception programming errors 2007-08-25 01:39:02 -04:00
Kconfig ACPI: register ACPI thermal zone as generic thermal zone devices 2008-02-01 23:12:19 -05:00
Makefile ACPI: Split out control for /proc/acpi entries from battery, ac, and sbs. 2007-11-19 11:21:50 -05:00
ac.c ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
acpi_memhotplug.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
asus_acpi.c ACPI: Schedule /proc/acpi/event for removal 2007-08-23 15:20:26 -04:00
battery.c ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
bay.c ACPI: bay: send envp with uevent - fix 2007-08-11 22:10:04 -04:00
blacklist.c ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems. 2008-01-23 21:28:12 -05:00
bus.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
button.c ACPI: button: send initial lid state after add and resume 2007-10-25 16:31:30 -04:00
cm_sbs.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
container.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
debug.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
dock.c ACPI: dock: Send key=value pair instead of plain value 2007-08-11 22:12:10 -04:00
ec.c ACPI: EC: "DEBUG" needs to be defined earlier 2008-01-23 22:34:09 -05:00
event.c ACPI: fix CONFIG_NET=n acpi_bus_generate_netlink_event build failure 2007-09-03 11:15:11 -04:00
fan.c ACPI: register ACPI Fan as generic thermal cooling device 2008-02-01 23:17:18 -05:00
glue.c ACPI: fix empty macros found by -Wextra 2007-07-22 00:54:24 -04:00
numa.c ACPI: fix modpost warnings 2007-12-13 17:50:09 -05:00
osl.c ACPI: make _OSI(Linux) console messages smarter 2008-01-23 21:26:15 -05:00
pci_bind.c ACPI: acpiphp: Remove dmesg spam on device remove 2007-11-20 19:06:04 -05:00
pci_irq.c ACPI : Not register gsi for PCI IDE controller in legacy mode 2008-01-10 22:49:58 -05:00
pci_link.c Driver core: change sysdev classes to use dynamic kobject names 2008-01-24 20:40:40 -08:00
pci_root.c ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers 2007-07-23 13:56:42 -04:00
power.c ACPI: power: don't cache power resource state 2007-10-25 16:31:31 -04:00
processor_core.c ACPI: register ACPI Processor as generic thermal cooling device 2008-02-01 23:18:19 -05:00
processor_idle.c x86: don't disable TSC in any C states on AMD Fam10h 2008-01-30 13:32:41 +01:00
processor_perflib.c acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues 2007-08-07 18:40:30 -04:00
processor_thermal.c ACPI: register ACPI Processor as generic thermal cooling device 2008-02-01 23:18:19 -05:00
processor_throttling.c ACPI: processor: Fix null pointer dereference in throttling 2008-01-15 00:47:47 -05:00
sbs.c ACPI: Make sysfs interface in ACPI power optional. 2008-01-01 14:27:24 -05:00
sbshc.c ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
sbshc.h ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
scan.c ACPI: EC: Enable boot EC before bus_scan 2008-01-01 14:12:55 -05:00
system.c Kobject: change drivers/acpi/system.c to use kobject_create_and_add 2008-01-24 20:40:28 -08:00
tables.c Revert "ACPI: parse 2nd MADT by default" 2007-03-30 14:16:10 -04:00
thermal.c ACPI: ACPI thermal zone handle notification correctly 2008-02-01 23:12:19 -05:00
toshiba_acpi.c Fix Oops in toshiba_acpi error return path 2007-11-14 18:45:36 -08:00
utils.c ACPI: clean up ACPI_MODULE_NAME() use 2007-02-12 22:42:12 -05:00
video.c ACPI: video_device_list corruption 2007-12-13 16:24:10 -05:00