diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-16 11:09:11 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-16 11:09:11 +1100 |
commit | e6f08d37e6641b38b2da4ad40d6ca2cfb616a1dc (patch) | |
tree | f6fbe6e761e72c972d6dc271cec087e870f6e033 /arch/powerpc/kernel | |
parent | 7c637b04fba553897f0de77d185e5263b06df06f (diff) | |
parent | e8bb3e00cff93ef2a0cfc09c3294aa37b4737e09 (diff) | |
download | kernel_replicant_linux-e6f08d37e6641b38b2da4ad40d6ca2cfb616a1dc.tar.gz kernel_replicant_linux-e6f08d37e6641b38b2da4ad40d6ca2cfb616a1dc.tar.bz2 kernel_replicant_linux-e6f08d37e6641b38b2da4ad40d6ca2cfb616a1dc.zip |
Merge branch 'cpuidle' into next
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/idle.c | 27 | ||||
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 39a2baa6ad58..8574b0e81ff1 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c @@ -39,9 +39,13 @@ #define cpu_should_die() 0 #endif +unsigned long cpuidle_disable = IDLE_NO_OVERRIDE; +EXPORT_SYMBOL(cpuidle_disable); + static int __init powersave_off(char *arg) { ppc_md.power_save = NULL; + cpuidle_disable = IDLE_POWERSAVE_OFF; return 0; } __setup("powersave=off", powersave_off); @@ -102,6 +106,29 @@ void cpu_idle(void) } } + +/* + * cpu_idle_wait - Used to ensure that all the CPUs come out of the old + * idle loop and start using the new idle loop. + * Required while changing idle handler on SMP systems. + * Caller must have changed idle handler to the new value before the call. + * This window may be larger on shared systems. + */ +void cpu_idle_wait(void) +{ + int cpu; + smp_mb(); + + /* kick all the CPUs so that they exit out of old idle routine */ + get_online_cpus(); + for_each_online_cpu(cpu) { + if (cpu != smp_processor_id()) + smp_send_reschedule(cpu); + } + put_online_cpus(); +} +EXPORT_SYMBOL_GPL(cpu_idle_wait); + int powersave_nap; #ifdef CONFIG_SYSCTL diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index f579be552094..6fdf5ffe8c44 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c @@ -18,6 +18,7 @@ #include <asm/machdep.h> #include <asm/smp.h> #include <asm/pmc.h> +#include <asm/system.h> #include "cacheinfo.h" @@ -51,6 +52,7 @@ static ssize_t store_smt_snooze_delay(struct sys_device *dev, return -EINVAL; per_cpu(smt_snooze_delay, cpu->sysdev.id) = snooze; + update_smt_snooze_delay(snooze); return count; } |