linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: warn users of smt-snooze-delay that the API isn't there anymore
@ 2014-02-22  0:14 Cody P Schafer
  2014-02-25  4:53 ` Madhavan Srinivasan
  2014-02-25  7:59 ` Deepthi Dharwar
  0 siblings, 2 replies; 6+ messages in thread
From: Cody P Schafer @ 2014-02-22  0:14 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Cody P Schafer, Madhavan Srinivasan,
	Olof Johansson, Paul Gortmaker, Wang Dongsheng
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel

/sys/devices/system/cpu/cpu*/smt-snooze-delay was converted into a NOP
in commit 3fa8cad82b94d0bed002571bd246f2299ffc876b, and now does
nothing. Add a pr_warn() to convince any users that they should stop
using it.

The commit message from the removing commit notes that this
functionality should move into the cpuidle driver, essentially by
adjusting target_residency to the specified value. At the moment,
target_residency is not exposed by cpuidle's sysfs, so there isn't a
drop in replacement for this.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/sysfs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 97e1dc9..84097b4 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -50,6 +50,9 @@ static ssize_t store_smt_snooze_delay(struct device *dev,
 	if (ret != 1)
 		return -EINVAL;
 
+	pr_warn_ratelimited("%s (%d): /sys/devices/system/cpu/cpu%d/smt-snooze-delay is deprecated and is a NOP\n",
+		  current->comm, task_pid_nr(current), cpu->dev.id);
+
 	per_cpu(smt_snooze_delay, cpu->dev.id) = snooze;
 	return count;
 }
@@ -60,6 +63,9 @@ static ssize_t show_smt_snooze_delay(struct device *dev,
 {
 	struct cpu *cpu = container_of(dev, struct cpu, dev);
 
+	pr_warn_ratelimited("%s (%d): /sys/devices/system/cpu/cpu%d/smt-snooze-delay is deprecated and is a NOP\n",
+		  current->comm, task_pid_nr(current), cpu->dev.id);
+
 	return sprintf(buf, "%ld\n", per_cpu(smt_snooze_delay, cpu->dev.id));
 }
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-26  3:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-22  0:14 [PATCH] powerpc: warn users of smt-snooze-delay that the API isn't there anymore Cody P Schafer
2014-02-25  4:53 ` Madhavan Srinivasan
2014-02-25 22:47   ` Cody P Schafer
2014-02-25  7:59 ` Deepthi Dharwar
2014-02-25 22:40   ` Benjamin Herrenschmidt
2014-02-26  3:45     ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).