1 #ifndef __ACPI_PROCESSOR_H
2 #define __ACPI_PROCESSOR_H
4 #include <linux/kernel.h>
6 #define ACPI_PROCESSOR_BUSY_METRIC 10
8 #define ACPI_PROCESSOR_MAX_POWER ACPI_C_STATE_COUNT
9 #define ACPI_PROCESSOR_MAX_C2_LATENCY 100
10 #define ACPI_PROCESSOR_MAX_C3_LATENCY 1000
12 #define ACPI_PROCESSOR_MAX_THROTTLING 16
13 #define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */
14 #define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4
16 /* Power Management */
18 struct acpi_processor_cx_policy
{
29 struct acpi_processor_cx
{
36 struct acpi_processor_cx_policy promotion
;
37 struct acpi_processor_cx_policy demotion
;
40 struct acpi_processor_power
{
44 struct acpi_processor_cx states
[ACPI_PROCESSOR_MAX_POWER
];
47 /* Performance Management */
49 struct acpi_pct_register
{
57 } __attribute__ ((packed
));
59 struct acpi_processor_px
{
60 acpi_integer core_frequency
; /* megahertz */
61 acpi_integer power
; /* milliWatts */
62 acpi_integer transition_latency
; /* microseconds */
63 acpi_integer bus_master_latency
; /* microseconds */
64 acpi_integer control
; /* control value */
65 acpi_integer status
; /* success indicator */
68 #define ACPI_PDC_REVISION_ID 0x1
70 struct acpi_processor_performance
{
72 unsigned int platform_limit
;
73 struct acpi_pct_register control_register
;
74 struct acpi_pct_register status_register
;
75 unsigned int state_count
;
76 struct acpi_processor_px
*states
;
78 /* the _PDC objects passed by the driver, if any */
79 struct acpi_object_list
*pdc
;
84 /* Throttling Control */
86 struct acpi_processor_tx
{
91 struct acpi_processor_throttling
{
97 struct acpi_processor_tx states
[ACPI_PROCESSOR_MAX_THROTTLING
];
100 /* Limit Interface */
102 struct acpi_processor_lx
{
103 int px
; /* performace state */
104 int tx
; /* throttle level */
107 struct acpi_processor_limit
{
108 struct acpi_processor_lx state
; /* current limit */
109 struct acpi_processor_lx thermal
; /* thermal limit */
110 struct acpi_processor_lx user
; /* user limit */
114 struct acpi_processor_flags
{
124 struct acpi_processor
{
128 int performance_platform_limit
;
129 struct acpi_processor_flags flags
;
130 struct acpi_processor_power power
;
131 struct acpi_processor_performance
*performance
;
132 struct acpi_processor_throttling throttling
;
133 struct acpi_processor_limit limit
;
136 extern int acpi_processor_register_performance (
137 struct acpi_processor_performance
* performance
,
139 extern void acpi_processor_unregister_performance (
140 struct acpi_processor_performance
* performance
,