diff options
| author | Eric Brower <ebrower@usa.net> | 2002-11-17 23:10:47 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-11-17 23:10:47 -0800 |
| commit | 3bc50a7eec012aefca9491614b243a54ede11b91 (patch) | |
| tree | 3a3271aa9fb38874bee5b51f3310935bf3c34350 | |
| parent | 6ea22620ab6c260c5eeeaafc0cb5b00e9a1b90eb (diff) | |
[SPARC]: Make APC idle a boot time cmdline option.
| -rw-r--r-- | arch/sparc/kernel/apc.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index cbc0d790cf17..f502d9b63bf1 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c @@ -22,7 +22,6 @@ /* Debugging * * #define APC_DEBUG_LED - * #define APC_NO_IDLE */ #define APC_MINOR MISC_DYNAMIC_MINOR @@ -31,10 +30,27 @@ volatile static u8 *regs; static int apc_regsize; +static int apc_no_idle __initdata = 0; #define apc_readb(offs) (sbus_readb(regs+offs)) #define apc_writeb(val, offs) (sbus_writeb(val, regs+offs)) +/* Specify "apc=noidle" on the kernel command line to + * disable APC CPU standby support. Certain prototype + * systems (SPARCstation-Fox) do not play well with APC + * CPU idle, so disable this if your system has APC and + * crashes randomly. + */ +static int __init apc_setup(char *str) +{ + if(!strncmp(str, "noidle", strlen("noidle"))) { + apc_no_idle = 1; + return 1; + } + return 0; +} +__setup("apc=", apc_setup); + /* * CPU idle callback function * See .../arch/sparc/kernel/process.c @@ -127,6 +143,7 @@ static int __init apc_probe(void) struct sbus_bus *sbus = NULL; struct sbus_dev *sdev = NULL; int iTmp = 0; + for_each_sbus(sbus) { for_each_sbusdev(sdev, sbus) { if (!strcmp(sdev->prom_name, APC_OBPNAME)) { @@ -155,12 +172,12 @@ sbus_done: return -ENODEV; } -#ifndef APC_NO_IDLE /* Assign power management IDLE handler */ - pm_idle = apc_swift_idle; -#endif + if(!apc_no_idle) + pm_idle = apc_swift_idle; - printk(KERN_INFO "%s: power management initialized\n", APC_DEVNAME); + printk(KERN_INFO "%s: power management initialized%s\n", + APC_DEVNAME, apc_no_idle ? " (CPU idle disabled)" : ""); return 0; } @@ -169,3 +186,4 @@ sbus_done: * initialized, so we install ourselves thusly: */ __initcall(apc_probe); + |
