From 8ea959a17fe6e27f7954dddad5b17b0e33f0d7ee Mon Sep 17 00:00:00 2001 From: Deepthi Dharwar Date: Wed, 3 Oct 2012 18:42:18 +0000 Subject: cpuidle/powerpc: Fix smt_snooze_delay functionality. smt_snooze_delay was designed to delay idle loop's nap entry in the native idle code before it got ported over to use as part of the cpuidle framework. A -ve value assigned to smt_snooze_delay should result in busy looping, in other words disabling the entry to nap state. - https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082450.html This particular functionality can be achieved currently by echo 1 > /sys/devices/system/cpu/cpu*/state1/disable but it is broken when one assigns -ve value to the smt_snooze_delay variable either via sysfs entry or ppc64_cpu util. This patch aims to fix this, by disabling nap state when smt_snooze_delay variable is set to -ve value. Signed-off-by: Deepthi Dharwar Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 8734b3855272..87502046c0dc 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -388,9 +388,9 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */ extern void power7_nap(void); #ifdef CONFIG_PSERIES_IDLE -extern void update_smt_snooze_delay(int snooze); +extern void update_smt_snooze_delay(int cpu, int residency); #else -static inline void update_smt_snooze_delay(int snooze) {} +static inline void update_smt_snooze_delay(int cpu, int residency) {} #endif extern void flush_instruction_cache(void); -- cgit v1.2.2