summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/sysfs.c
diff options
context:
space:
mode:
authorDeepthi Dharwar <deepthi@linux.vnet.ibm.com>2012-10-03 20:42:18 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-10-18 01:57:24 +0200
commit8ea959a17fe6e27f7954dddad5b17b0e33f0d7ee (patch)
treee16bf4c3b7a9bbcb2822c862fccf7b1b8ab336b0 /arch/powerpc/kernel/sysfs.c
parentcpuidle/powerpc: Fix target residency initialisation in pseries cpuidle (diff)
downloadlinux-8ea959a17fe6e27f7954dddad5b17b0e33f0d7ee.tar.xz
linux-8ea959a17fe6e27f7954dddad5b17b0e33f0d7ee.zip
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 <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r--arch/powerpc/kernel/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 8302af649219..cf357a059ddb 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -50,7 +50,7 @@ static ssize_t store_smt_snooze_delay(struct device *dev,
return -EINVAL;
per_cpu(smt_snooze_delay, cpu->dev.id) = snooze;
- update_smt_snooze_delay(snooze);
+ update_smt_snooze_delay(cpu->dev.id, snooze);
return count;
}