diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-04-27 19:54:49 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-04-27 19:54:49 -0400 |
commit | e4f5a3adc454745fea35f1c312e14cbeba6e0ea4 (patch) | |
tree | 7dae08f7d3466fcf158808784ec3b706e6cafec6 /include | |
parent | ae6208301e1e37a203fab817b59279a0f5d774c6 (diff) | |
parent | a8e39c35b5d09598e129aa9b5e6f35aa3a1915d9 (diff) |
Merge branch 'pm-cpuidle'
* pm-cpuidle: (51 commits)
cpuidle: add maintainer entry
ARM: s3c64xx: cpuidle: use init/exit common routine
SH: cpuidle: use init/exit common routine
cpuidle: fix comment format
ARM: imx: cpuidle: use init/exit common routine
ARM: davinci: cpuidle: use init/exit common routine
ARM: kirkwood: cpuidle: use init/exit common routine
ARM: calxeda: cpuidle: use init/exit common routine
ARM: tegra: cpuidle: use init/exit common routine for tegra3
ARM: tegra: cpuidle: use init/exit common routine for tegra2
ARM: OMAP4: cpuidle: use init/exit common routine
ARM: shmobile: cpuidle: use init/exit common routine
ARM: tegra: cpuidle: use init/exit common routine
ARM: OMAP3: cpuidle: use init/exit common routine
ARM: at91: cpuidle: use init/exit common routine
ARM: ux500: cpuidle: use init/exit common routine
cpuidle: make a single register function for all
ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu
cpuidle: remove en_core_tk_irqen flag
ARM: OMAP3: remove cpuidle_wrap_enter
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clockchips.h | 32 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 23 |
2 files changed, 26 insertions, 29 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 66346521cb65..f9fd93758333 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -8,6 +8,20 @@ | |||
8 | #ifndef _LINUX_CLOCKCHIPS_H | 8 | #ifndef _LINUX_CLOCKCHIPS_H |
9 | #define _LINUX_CLOCKCHIPS_H | 9 | #define _LINUX_CLOCKCHIPS_H |
10 | 10 | ||
11 | /* Clock event notification values */ | ||
12 | enum clock_event_nofitiers { | ||
13 | CLOCK_EVT_NOTIFY_ADD, | ||
14 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
15 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
16 | CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | ||
17 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
18 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
19 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
20 | CLOCK_EVT_NOTIFY_RESUME, | ||
21 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
22 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
23 | }; | ||
24 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD | 25 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD |
12 | 26 | ||
13 | #include <linux/clocksource.h> | 27 | #include <linux/clocksource.h> |
@@ -26,20 +40,6 @@ enum clock_event_mode { | |||
26 | CLOCK_EVT_MODE_RESUME, | 40 | CLOCK_EVT_MODE_RESUME, |
27 | }; | 41 | }; |
28 | 42 | ||
29 | /* Clock event notification values */ | ||
30 | enum clock_event_nofitiers { | ||
31 | CLOCK_EVT_NOTIFY_ADD, | ||
32 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
33 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
34 | CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | ||
35 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
37 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
38 | CLOCK_EVT_NOTIFY_RESUME, | ||
39 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
40 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
41 | }; | ||
42 | |||
43 | /* | 43 | /* |
44 | * Clock event features | 44 | * Clock event features |
45 | */ | 45 | */ |
@@ -173,7 +173,7 @@ extern int tick_receive_broadcast(void); | |||
173 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 173 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
174 | extern void clockevents_notify(unsigned long reason, void *arg); | 174 | extern void clockevents_notify(unsigned long reason, void *arg); |
175 | #else | 175 | #else |
176 | # define clockevents_notify(reason, arg) do { } while (0) | 176 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | 179 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ |
@@ -181,7 +181,7 @@ extern void clockevents_notify(unsigned long reason, void *arg); | |||
181 | static inline void clockevents_suspend(void) {} | 181 | static inline void clockevents_suspend(void) {} |
182 | static inline void clockevents_resume(void) {} | 182 | static inline void clockevents_resume(void) {} |
183 | 183 | ||
184 | #define clockevents_notify(reason, arg) do { } while (0) | 184 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
185 | 185 | ||
186 | #endif | 186 | #endif |
187 | 187 | ||
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 480c14dc1ddd..3c86faa59798 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -57,6 +57,7 @@ struct cpuidle_state { | |||
57 | /* Idle State Flags */ | 57 | /* Idle State Flags */ |
58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ | 58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ |
59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ | 59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ |
60 | #define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */ | ||
60 | 61 | ||
61 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 62 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
62 | 63 | ||
@@ -104,8 +105,8 @@ struct cpuidle_driver { | |||
104 | struct module *owner; | 105 | struct module *owner; |
105 | int refcnt; | 106 | int refcnt; |
106 | 107 | ||
107 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 108 | /* used by the cpuidle framework to setup the broadcast timer */ |
108 | unsigned int en_core_tk_irqen:1; | 109 | unsigned int bctimer:1; |
109 | /* states array must be ordered in decreasing power consumption */ | 110 | /* states array must be ordered in decreasing power consumption */ |
110 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 111 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
111 | int state_count; | 112 | int state_count; |
@@ -122,17 +123,15 @@ extern void cpuidle_driver_unref(void); | |||
122 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | 123 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); |
123 | extern int cpuidle_register_device(struct cpuidle_device *dev); | 124 | extern int cpuidle_register_device(struct cpuidle_device *dev); |
124 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); | 125 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); |
125 | 126 | extern int cpuidle_register(struct cpuidle_driver *drv, | |
127 | const struct cpumask *const coupled_cpus); | ||
128 | extern void cpuidle_unregister(struct cpuidle_driver *drv); | ||
126 | extern void cpuidle_pause_and_lock(void); | 129 | extern void cpuidle_pause_and_lock(void); |
127 | extern void cpuidle_resume_and_unlock(void); | 130 | extern void cpuidle_resume_and_unlock(void); |
128 | extern void cpuidle_pause(void); | 131 | extern void cpuidle_pause(void); |
129 | extern void cpuidle_resume(void); | 132 | extern void cpuidle_resume(void); |
130 | extern int cpuidle_enable_device(struct cpuidle_device *dev); | 133 | extern int cpuidle_enable_device(struct cpuidle_device *dev); |
131 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | 134 | extern void cpuidle_disable_device(struct cpuidle_device *dev); |
132 | extern int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
133 | struct cpuidle_driver *drv, int index, | ||
134 | int (*enter)(struct cpuidle_device *dev, | ||
135 | struct cpuidle_driver *drv, int index)); | ||
136 | extern int cpuidle_play_dead(void); | 135 | extern int cpuidle_play_dead(void); |
137 | 136 | ||
138 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | 137 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); |
@@ -151,7 +150,10 @@ static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } | |||
151 | static inline int cpuidle_register_device(struct cpuidle_device *dev) | 150 | static inline int cpuidle_register_device(struct cpuidle_device *dev) |
152 | {return -ENODEV; } | 151 | {return -ENODEV; } |
153 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } | 152 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } |
154 | 153 | static inline int cpuidle_register(struct cpuidle_driver *drv, | |
154 | const struct cpumask *const coupled_cpus) | ||
155 | {return -ENODEV; } | ||
156 | static inline void cpuidle_unregister(struct cpuidle_driver *drv) { } | ||
155 | static inline void cpuidle_pause_and_lock(void) { } | 157 | static inline void cpuidle_pause_and_lock(void) { } |
156 | static inline void cpuidle_resume_and_unlock(void) { } | 158 | static inline void cpuidle_resume_and_unlock(void) { } |
157 | static inline void cpuidle_pause(void) { } | 159 | static inline void cpuidle_pause(void) { } |
@@ -159,11 +161,6 @@ static inline void cpuidle_resume(void) { } | |||
159 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) | 161 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) |
160 | {return -ENODEV; } | 162 | {return -ENODEV; } |
161 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 163 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
162 | static inline int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
163 | struct cpuidle_driver *drv, int index, | ||
164 | int (*enter)(struct cpuidle_device *dev, | ||
165 | struct cpuidle_driver *drv, int index)) | ||
166 | { return -ENODEV; } | ||
167 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | 164 | static inline int cpuidle_play_dead(void) {return -ENODEV; } |
168 | #endif | 165 | #endif |
169 | 166 | ||