Commit 06a7e66d authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: powersave_nap sysctl

Implement powersave_nap sysctl, like ppc32.  This allows us to disable the
nap function which is useful when profiling with oprofile (to get an
accurate count of idle time).
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a7275ad7
......@@ -20,6 +20,8 @@
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/cpu.h>
#include <linux/module.h>
#include <linux/sysctl.h>
#include <asm/system.h>
#include <asm/processor.h>
......@@ -296,6 +298,38 @@ int cpu_idle(void)
return 0;
}
int powersave_nap;
#ifdef CONFIG_SYSCTL
/*
* Register the sysctl to set/clear powersave_nap.
*/
static ctl_table powersave_nap_ctl_table[]={
{
.ctl_name = KERN_PPC_POWERSAVE_NAP,
.procname = "powersave-nap",
.data = &powersave_nap,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{ 0, },
};
static ctl_table powersave_nap_sysctl_root[] = {
{ 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, },
{ 0,},
};
static int __init
register_powersave_nap_sysctl(void)
{
register_sysctl_table(powersave_nap_sysctl_root, 0);
return 0;
}
__initcall(register_powersave_nap_sysctl);
#endif
int idle_setup(void)
{
#ifdef CONFIG_PPC_ISERIES
......
......@@ -82,8 +82,6 @@ unsigned long decr_overclock_proc0 = 1;
unsigned long decr_overclock_set = 0;
unsigned long decr_overclock_proc0_set = 0;
int powersave_nap;
unsigned char aux_device_present;
#ifdef CONFIG_MAGIC_SYSRQ
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment