initial commit with v2.6.9
[linux-2.6.9-moxart.git] / include / acpi / processor.h
blobdab7521d8ac6c0ff9ed1ffe8c00eaf91be83117c
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 {
19 u32 count;
20 int state;
21 struct {
22 u32 time;
23 u32 ticks;
24 u32 count;
25 u32 bm;
26 } threshold;
29 struct acpi_processor_cx {
30 u8 valid;
31 u32 address;
32 u32 latency;
33 u32 latency_ticks;
34 u32 power;
35 u32 usage;
36 struct acpi_processor_cx_policy promotion;
37 struct acpi_processor_cx_policy demotion;
40 struct acpi_processor_power {
41 int state;
42 int default_state;
43 u32 bm_activity;
44 struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
47 /* Performance Management */
49 struct acpi_pct_register {
50 u8 descriptor;
51 u16 length;
52 u8 space_id;
53 u8 bit_width;
54 u8 bit_offset;
55 u8 reserved;
56 u64 address;
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 {
71 unsigned int state;
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 {
87 u16 power;
88 u16 performance;
91 struct acpi_processor_throttling {
92 int state;
93 u32 address;
94 u8 duty_offset;
95 u8 duty_width;
96 int state_count;
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 {
115 u8 power:1;
116 u8 performance:1;
117 u8 throttling:1;
118 u8 limit:1;
119 u8 bm_control:1;
120 u8 bm_check:1;
121 u8 reserved:2;
124 struct acpi_processor {
125 acpi_handle handle;
126 u32 acpi_id;
127 u32 id;
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,
138 unsigned int cpu);
139 extern void acpi_processor_unregister_performance (
140 struct acpi_processor_performance * performance,
141 unsigned int cpu);
143 #endif