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
a7054210
Commit
a7054210
authored
Apr 02, 2004
by
Eric Brower
Committed by
David S. Miller
Apr 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Add sysctl to control serial console power-off restrictions.
parent
0458380f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
arch/sparc/kernel/process.c
arch/sparc/kernel/process.c
+7
-1
arch/sparc64/kernel/power.c
arch/sparc64/kernel/power.c
+7
-1
include/linux/sysctl.h
include/linux/sysctl.h
+1
-0
kernel/sysctl.c
kernel/sysctl.c
+9
-0
No files found.
arch/sparc/kernel/process.c
View file @
a7054210
...
...
@@ -55,6 +55,12 @@ void (*pm_idle)(void);
*/
void
(
*
pm_power_off
)(
void
);
/*
* sysctl - toggle power-off restriction for serial console
* systems in machine_power_off()
*/
int
scons_pwroff
=
1
;
extern
void
fpsave
(
unsigned
long
*
,
unsigned
long
*
,
void
*
,
unsigned
long
*
);
struct
task_struct
*
last_task_used_math
=
NULL
;
...
...
@@ -186,7 +192,7 @@ EXPORT_SYMBOL(machine_restart);
void
machine_power_off
(
void
)
{
#ifdef CONFIG_SUN_AUXIO
if
(
auxio_power_register
&&
!
serial_console
)
if
(
auxio_power_register
&&
(
!
serial_console
||
scons_pwroff
)
)
*
auxio_power_register
|=
AUXIO_POWER_OFF
;
#endif
machine_halt
();
...
...
arch/sparc64/kernel/power.c
View file @
a7054210
...
...
@@ -20,6 +20,12 @@
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
/*
* sysctl - toggle power-off restriction for serial console
* systems in machine_power_off()
*/
int
scons_pwroff
=
1
;
#ifdef CONFIG_PCI
static
unsigned
long
power_reg
=
0UL
;
...
...
@@ -44,7 +50,7 @@ static void (*poweroff_method)(void) = machine_alt_power_off;
void
machine_power_off
(
void
)
{
if
(
!
serial_console
)
{
if
(
!
serial_console
||
scons_pwroff
)
{
#ifdef CONFIG_PCI
if
(
power_reg
!=
0UL
)
{
/* Both register bits seem to have the
...
...
include/linux/sysctl.h
View file @
a7054210
...
...
@@ -131,6 +131,7 @@ enum
KERN_PRINTK_RATELIMIT_BURST
=
61
,
/* int: tune printk ratelimiting */
KERN_PTY
=
62
,
/* dir: pty driver */
KERN_NGROUPS_MAX
=
63
,
/* int: NGROUPS_MAX */
KERN_SPARC_SCONS_PWROFF
=
64
,
/* int: serial console power-off halt */
};
...
...
kernel/sysctl.c
View file @
a7054210
...
...
@@ -93,6 +93,7 @@ extern int sem_ctls[];
#ifdef __sparc__
extern
char
reboot_command
[];
extern
int
stop_a_enabled
;
extern
int
scons_pwroff
;
#endif
#ifdef __hppa__
...
...
@@ -325,6 +326,14 @@ static ctl_table kern_table[] = {
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
KERN_SPARC_SCONS_PWROFF
,
.
procname
=
"scons-poweroff"
,
.
data
=
&
scons_pwroff
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#ifdef __hppa__
{
...
...
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