aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/processor.h3
-rw-r--r--include/linux/cpuidle.h26
2 files changed, 25 insertions, 4 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 6e253b5b0f3b..f6d7c508917c 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -34,6 +34,7 @@
34 34
35#define ACPI_CSTATE_SYSTEMIO (0) 35#define ACPI_CSTATE_SYSTEMIO (0)
36#define ACPI_CSTATE_FFH (1) 36#define ACPI_CSTATE_FFH (1)
37#define ACPI_CSTATE_HALT (2)
37 38
38/* Power Management */ 39/* Power Management */
39 40
@@ -64,7 +65,7 @@ struct acpi_processor_cx {
64 u8 valid; 65 u8 valid;
65 u8 type; 66 u8 type;
66 u32 address; 67 u32 address;
67 u8 space_id; 68 u8 entry_method;
68 u8 index; 69 u8 index;
69 u32 latency; 70 u32 latency;
70 u32 latency_ticks; 71 u32 latency_ticks;
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index b0fd85ab9efb..c8eb8c71809e 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -46,9 +46,10 @@ struct cpuidle_state {
46/* Idle State Flags */ 46/* Idle State Flags */
47#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ 47#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
48#define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */ 48#define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */
49#define CPUIDLE_FLAG_SHALLOW (0x10) /* low latency, minimal savings */ 49#define CPUIDLE_FLAG_POLL (0x10) /* no latency, no savings */
50#define CPUIDLE_FLAG_BALANCED (0x20) /* medium latency, moderate savings */ 50#define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */
51#define CPUIDLE_FLAG_DEEP (0x40) /* high latency, large savings */ 51#define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */
52#define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */
52 53
53#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) 54#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
54 55
@@ -72,6 +73,19 @@ cpuidle_set_statedata(struct cpuidle_state *state, void *data)
72 state->driver_data = data; 73 state->driver_data = data;
73} 74}
74 75
76#ifdef CONFIG_SMP
77#ifdef CONFIG_ARCH_HAS_CPU_IDLE_WAIT
78static inline void cpuidle_kick_cpus(void)
79{
80 cpu_idle_wait();
81}
82#else /* !CONFIG_ARCH_HAS_CPU_IDLE_WAIT */
83#error "Arch needs cpu_idle_wait() equivalent here"
84#endif /* !CONFIG_ARCH_HAS_CPU_IDLE_WAIT */
85#else /* !CONFIG_SMP */
86static inline void cpuidle_kick_cpus(void) {}
87#endif /* !CONFIG_SMP */
88
75struct cpuidle_state_kobj { 89struct cpuidle_state_kobj {
76 struct cpuidle_state *state; 90 struct cpuidle_state *state;
77 struct completion kobj_unregister; 91 struct completion kobj_unregister;
@@ -178,4 +192,10 @@ static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { }
178 192
179#endif 193#endif
180 194
195#ifdef CONFIG_ARCH_HAS_CPU_RELAX
196#define CPUIDLE_DRIVER_STATE_START 1
197#else
198#define CPUIDLE_DRIVER_STATE_START 0
199#endif
200
181#endif /* _LINUX_CPUIDLE_H */ 201#endif /* _LINUX_CPUIDLE_H */