diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 18:21:02 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 18:21:02 -0400 |
| commit | 3ed1c478eff8db80e234d5446cb378b503135888 (patch) | |
| tree | e1c8e0f488ca49c49b5a31fe59add4254381dd4b /include/linux | |
| parent | 151173e8ce9b95bbbbd7eedb9035cfaffbdb7cb2 (diff) | |
| parent | 371deb9500831ad1afbf9ea00e373f650deaed2f (diff) | |
Merge tag 'pm+acpi-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI updates from Rafael J Wysocki:
- ARM big.LITTLE cpufreq driver from Viresh Kumar.
- exynos5440 cpufreq driver from Amit Daniel Kachhap.
- cpufreq core cleanup and code consolidation from Viresh Kumar and
Stratos Karafotis.
- cpufreq scalability improvement from Nathan Zimmer.
- AMD "frequency sensitivity feedback" powersave bias for the ondemand
cpufreq governor from Jacob Shin.
- cpuidle code consolidation and cleanups from Daniel Lezcano.
- ARM OMAP cpuidle fixes from Santosh Shilimkar and Daniel Lezcano.
- ACPICA fixes and other improvements from Bob Moore, Jung-uk Kim, Lv
Zheng, Yinghai Lu, Tang Chen, Colin Ian King, and Linn Crosetto.
- ACPI core updates related to hotplug from Toshi Kani, Paul Bolle,
Yasuaki Ishimatsu, and Rafael J Wysocki.
- Intel Lynxpoint LPSS (Low-Power Subsystem) support improvements from
Rafael J Wysocki and Andy Shevchenko.
* tag 'pm+acpi-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (192 commits)
cpufreq: Revert incorrect commit 5800043
cpufreq: MAINTAINERS: Add co-maintainer
cpuidle: add maintainer entry
ACPI / thermal: do not always return THERMAL_TREND_RAISING for active trip points
ARM: s3c64xx: cpuidle: use init/exit common routine
cpufreq: pxa2xx: initialize variables
ACPI: video: correct acpi_video_bus_add error processing
SH: cpuidle: use init/exit common routine
ARM: S5pv210: compiling issue, ARM_S5PV210_CPUFREQ needs CONFIG_CPU_FREQ_TABLE=y
ACPI: Fix wrong parameter passed to memblock_reserve
cpuidle: fix comment format
pnp: use %*phC to dump small buffers
isapnp: remove debug leftovers
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
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 4 | ||||
| -rw-r--r-- | include/linux/clockchips.h | 32 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 21 | ||||
| -rw-r--r-- | include/linux/cpuidle.h | 23 | ||||
| -rw-r--r-- | include/linux/platform_data/clk-lpss.h | 18 |
5 files changed, 62 insertions, 36 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 03053aca5b32..17b5b5967641 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -195,7 +195,7 @@ extern bool wmi_has_guid(const char *guid); | |||
| 195 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) | 195 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) |
| 196 | 196 | ||
| 197 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); | 197 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); |
| 198 | extern long acpi_is_video_device(struct acpi_device *device); | 198 | extern long acpi_is_video_device(acpi_handle handle); |
| 199 | extern void acpi_video_dmi_promote_vendor(void); | 199 | extern void acpi_video_dmi_promote_vendor(void); |
| 200 | extern void acpi_video_dmi_demote_vendor(void); | 200 | extern void acpi_video_dmi_demote_vendor(void); |
| 201 | extern int acpi_video_backlight_support(void); | 201 | extern int acpi_video_backlight_support(void); |
| @@ -208,7 +208,7 @@ static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle) | |||
| 208 | return 0; | 208 | return 0; |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | static inline long acpi_is_video_device(struct acpi_device *device) | 211 | static inline long acpi_is_video_device(acpi_handle handle) |
| 212 | { | 212 | { |
| 213 | return 0; | 213 | return 0; |
| 214 | } | 214 | } |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 464e229e7d84..963d71431388 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 | */ |
| @@ -184,7 +184,7 @@ static inline int tick_check_broadcast_expired(void) { return 0; } | |||
| 184 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 184 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
| 185 | extern void clockevents_notify(unsigned long reason, void *arg); | 185 | extern void clockevents_notify(unsigned long reason, void *arg); |
| 186 | #else | 186 | #else |
| 187 | # define clockevents_notify(reason, arg) do { } while (0) | 187 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
| 188 | #endif | 188 | #endif |
| 189 | 189 | ||
| 190 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | 190 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ |
| @@ -192,7 +192,7 @@ extern void clockevents_notify(unsigned long reason, void *arg); | |||
| 192 | static inline void clockevents_suspend(void) {} | 192 | static inline void clockevents_suspend(void) {} |
| 193 | static inline void clockevents_resume(void) {} | 193 | static inline void clockevents_resume(void) {} |
| 194 | 194 | ||
| 195 | #define clockevents_notify(reason, arg) do { } while (0) | 195 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
| 196 | static inline int tick_check_broadcast_expired(void) { return 0; } | 196 | static inline int tick_check_broadcast_expired(void) { return 0; } |
| 197 | 197 | ||
| 198 | #endif | 198 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a22944ca0526..037d36ae63e5 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -106,6 +106,7 @@ struct cpufreq_policy { | |||
| 106 | * governors are used */ | 106 | * governors are used */ |
| 107 | unsigned int policy; /* see above */ | 107 | unsigned int policy; /* see above */ |
| 108 | struct cpufreq_governor *governor; /* see below */ | 108 | struct cpufreq_governor *governor; /* see below */ |
| 109 | void *governor_data; | ||
| 109 | 110 | ||
| 110 | struct work_struct update; /* if update_policy() needs to be | 111 | struct work_struct update; /* if update_policy() needs to be |
| 111 | * called, but you're in IRQ context */ | 112 | * called, but you're in IRQ context */ |
| @@ -178,9 +179,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu | |||
| 178 | * CPUFREQ GOVERNORS * | 179 | * CPUFREQ GOVERNORS * |
| 179 | *********************************************************************/ | 180 | *********************************************************************/ |
| 180 | 181 | ||
| 181 | #define CPUFREQ_GOV_START 1 | 182 | #define CPUFREQ_GOV_START 1 |
| 182 | #define CPUFREQ_GOV_STOP 2 | 183 | #define CPUFREQ_GOV_STOP 2 |
| 183 | #define CPUFREQ_GOV_LIMITS 3 | 184 | #define CPUFREQ_GOV_LIMITS 3 |
| 185 | #define CPUFREQ_GOV_POLICY_INIT 4 | ||
| 186 | #define CPUFREQ_GOV_POLICY_EXIT 5 | ||
| 184 | 187 | ||
| 185 | struct cpufreq_governor { | 188 | struct cpufreq_governor { |
| 186 | char name[CPUFREQ_NAME_LEN]; | 189 | char name[CPUFREQ_NAME_LEN]; |
| @@ -229,6 +232,13 @@ struct cpufreq_driver { | |||
| 229 | struct module *owner; | 232 | struct module *owner; |
| 230 | char name[CPUFREQ_NAME_LEN]; | 233 | char name[CPUFREQ_NAME_LEN]; |
| 231 | u8 flags; | 234 | u8 flags; |
| 235 | /* | ||
| 236 | * This should be set by platforms having multiple clock-domains, i.e. | ||
| 237 | * supporting multiple policies. With this sysfs directories of governor | ||
| 238 | * would be created in cpu/cpu<num>/cpufreq/ directory and so they can | ||
| 239 | * use the same governor with different tunables for different clusters. | ||
| 240 | */ | ||
| 241 | bool have_governor_per_policy; | ||
| 232 | 242 | ||
| 233 | /* needed by all drivers */ | 243 | /* needed by all drivers */ |
| 234 | int (*init) (struct cpufreq_policy *policy); | 244 | int (*init) (struct cpufreq_policy *policy); |
| @@ -268,8 +278,8 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data); | |||
| 268 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 278 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
| 269 | 279 | ||
| 270 | 280 | ||
| 271 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); | 281 | void cpufreq_notify_transition(struct cpufreq_policy *policy, |
| 272 | 282 | struct cpufreq_freqs *freqs, unsigned int state); | |
| 273 | 283 | ||
| 274 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 284 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) |
| 275 | { | 285 | { |
| @@ -329,6 +339,7 @@ const char *cpufreq_get_current_driver(void); | |||
| 329 | *********************************************************************/ | 339 | *********************************************************************/ |
| 330 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 340 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
| 331 | int cpufreq_update_policy(unsigned int cpu); | 341 | int cpufreq_update_policy(unsigned int cpu); |
| 342 | bool have_governor_per_policy(void); | ||
| 332 | 343 | ||
| 333 | #ifdef CONFIG_CPU_FREQ | 344 | #ifdef CONFIG_CPU_FREQ |
| 334 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 345 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
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 | ||
diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h new file mode 100644 index 000000000000..528e73ce46d2 --- /dev/null +++ b/include/linux/platform_data/clk-lpss.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * Intel Low Power Subsystem clocks. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013, Intel Corporation | ||
| 5 | * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
| 6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __CLK_LPSS_H | ||
| 14 | #define __CLK_LPSS_H | ||
| 15 | |||
| 16 | extern int lpt_clk_init(void); | ||
| 17 | |||
| 18 | #endif /* __CLK_LPSS_H */ | ||
