Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3bc50a7e
Commit
3bc50a7e
authored
Nov 17, 2002
by
Eric Brower
Committed by
David S. Miller
Nov 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Make APC idle a boot time cmdline option.
parent
6ea22620
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
arch/sparc/kernel/apc.c
arch/sparc/kernel/apc.c
+23
-5
No files found.
arch/sparc/kernel/apc.c
View file @
3bc50a7e
...
...
@@ -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 @@ static int __init apc_probe(void)
return
-
ENODEV
;
}
#ifndef APC_NO_IDLE
/* Assign power management IDLE handler */
if
(
!
apc_no_idle
)
pm_idle
=
apc_swift_idle
;
#endif
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 @@ static int __init apc_probe(void)
* initialized, so we install ourselves thusly:
*/
__initcall
(
apc_probe
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment