diff options
author | Deepthi Dharwar <deepthi@linux.vnet.ibm.com> | 2014-01-14 05:56:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-01-29 01:02:24 -0500 |
commit | 3fa8cad82b94d0bed002571bd246f2299ffc876b (patch) | |
tree | 3c85c1da6f6d78a8f96348df0e4d23a38256ebe9 /drivers/cpuidle | |
parent | bf7f61f2dfc5c5764e862bee317a5a227091d0d2 (diff) |
powerpc/pseries/cpuidle: smt-snooze-delay cleanup.
smt-snooze-delay was designed to disable NAP state or delay the entry
to the NAP state prior to adoption of cpuidle framework. This
is per-cpu variable. With the coming of CPUIDLE framework,
states can be disabled on per-cpu basis using the cpuidle/enable
sysfs entry.
Also, with the coming of cpuidle driver each state's target residency
is per-driver unlike earlier which was per-device. Therefore,
the per-cpu sysfs smt-snooze-delay which decides the target residency
of the idle state on a particular cpu causes more confusion to the user
as we cannot have different smt-snooze-delay (target residency)
values for each cpu.
In the current code, smt-snooze-delay functionality is completely broken.
It makes sense to remove smt-snooze-delay from idle driver with the
coming of cpuidle framework.
However, sysfs files are retained as ppc64_util currently
utilises it. Once we fix ppc64_util, propose to clean
up the kernel code.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle-pseries.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c index bb56091685d3..7ab564aa0b1c 100644 --- a/drivers/cpuidle/cpuidle-pseries.c +++ b/drivers/cpuidle/cpuidle-pseries.c | |||
@@ -162,23 +162,6 @@ static struct cpuidle_state shared_states[] = { | |||
162 | .enter = &shared_cede_loop }, | 162 | .enter = &shared_cede_loop }, |
163 | }; | 163 | }; |
164 | 164 | ||
165 | void update_smt_snooze_delay(int cpu, int residency) | ||
166 | { | ||
167 | struct cpuidle_driver *drv = cpuidle_get_driver(); | ||
168 | struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu); | ||
169 | |||
170 | if (cpuidle_state_table != dedicated_states) | ||
171 | return; | ||
172 | |||
173 | if (residency < 0) { | ||
174 | /* Disable the Nap state on that cpu */ | ||
175 | if (dev) | ||
176 | dev->states_usage[1].disable = 1; | ||
177 | } else | ||
178 | if (drv) | ||
179 | drv->states[1].target_residency = residency; | ||
180 | } | ||
181 | |||
182 | static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, | 165 | static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, |
183 | unsigned long action, void *hcpu) | 166 | unsigned long action, void *hcpu) |
184 | { | 167 | { |