diff options
| -rw-r--r-- | arch/x86/xen/setup.c | 3 | ||||
| -rw-r--r-- | drivers/cpuidle/cpuidle.c | 4 | ||||
| -rw-r--r-- | include/linux/cpuidle.h | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 60aeeb56948f..a9627e2e3295 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
| 10 | #include <linux/pm.h> | 10 | #include <linux/pm.h> |
| 11 | #include <linux/memblock.h> | 11 | #include <linux/memblock.h> |
| 12 | #include <linux/cpuidle.h> | ||
| 12 | 13 | ||
| 13 | #include <asm/elf.h> | 14 | #include <asm/elf.h> |
| 14 | #include <asm/vdso.h> | 15 | #include <asm/vdso.h> |
| @@ -426,7 +427,7 @@ void __init xen_arch_setup(void) | |||
| 426 | #ifdef CONFIG_X86_32 | 427 | #ifdef CONFIG_X86_32 |
| 427 | boot_cpu_data.hlt_works_ok = 1; | 428 | boot_cpu_data.hlt_works_ok = 1; |
| 428 | #endif | 429 | #endif |
| 429 | pm_idle = default_idle; | 430 | disable_cpuidle(); |
| 430 | boot_option_idle_override = IDLE_HALT; | 431 | boot_option_idle_override = IDLE_HALT; |
| 431 | 432 | ||
| 432 | fiddle_vdso(); | 433 | fiddle_vdso(); |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index faae2c357bab..041df0b056b2 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
| @@ -34,6 +34,10 @@ int cpuidle_disabled(void) | |||
| 34 | { | 34 | { |
| 35 | return off; | 35 | return off; |
| 36 | } | 36 | } |
| 37 | void disable_cpuidle(void) | ||
| 38 | { | ||
| 39 | off = 1; | ||
| 40 | } | ||
| 37 | 41 | ||
| 38 | #if defined(CONFIG_ARCH_HAS_CPU_IDLE_WAIT) | 42 | #if defined(CONFIG_ARCH_HAS_CPU_IDLE_WAIT) |
| 39 | static void cpuidle_kick_cpus(void) | 43 | static void cpuidle_kick_cpus(void) |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 36719ead50e8..b89f67da919e 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -122,6 +122,7 @@ struct cpuidle_driver { | |||
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | #ifdef CONFIG_CPU_IDLE | 124 | #ifdef CONFIG_CPU_IDLE |
| 125 | extern void disable_cpuidle(void); | ||
| 125 | 126 | ||
| 126 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | 127 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); |
| 127 | struct cpuidle_driver *cpuidle_get_driver(void); | 128 | struct cpuidle_driver *cpuidle_get_driver(void); |
| @@ -135,6 +136,7 @@ extern int cpuidle_enable_device(struct cpuidle_device *dev); | |||
| 135 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | 136 | extern void cpuidle_disable_device(struct cpuidle_device *dev); |
| 136 | 137 | ||
| 137 | #else | 138 | #else |
| 139 | static inline void disable_cpuidle(void) { } | ||
| 138 | 140 | ||
| 139 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) | 141 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) |
| 140 | {return -ENODEV; } | 142 | {return -ENODEV; } |
