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
nexedi
linux
Commits
d837cda3
Commit
d837cda3
authored
Jul 30, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPARC: Kill CONFIG_SUN_CONSOLE checks, always on so check is pointless.
parent
d4d9c3ac
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
84 deletions
+34
-84
arch/sparc/kernel/process.c
arch/sparc/kernel/process.c
+0
-6
arch/sparc/kernel/setup.c
arch/sparc/kernel/setup.c
+1
-10
arch/sparc/prom/misc.c
arch/sparc/prom/misc.c
+0
-6
arch/sparc64/kernel/process.c
arch/sparc64/kernel/process.c
+0
-8
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/setup.c
+1
-8
arch/sparc64/prom/misc.c
arch/sparc64/prom/misc.c
+32
-46
No files found.
arch/sparc/kernel/process.c
View file @
d837cda3
...
@@ -146,19 +146,15 @@ extern char reboot_command [];
...
@@ -146,19 +146,15 @@ extern char reboot_command [];
extern
int
serial_console
;
extern
int
serial_console
;
#ifdef CONFIG_SUN_CONSOLE
extern
void
(
*
prom_palette
)(
int
);
extern
void
(
*
prom_palette
)(
int
);
#endif
void
machine_halt
(
void
)
void
machine_halt
(
void
)
{
{
sti
();
sti
();
mdelay
(
8
);
mdelay
(
8
);
cli
();
cli
();
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
prom_halt
();
prom_halt
();
panic
(
"Halt failed!"
);
panic
(
"Halt failed!"
);
}
}
...
@@ -173,10 +169,8 @@ void machine_restart(char * cmd)
...
@@ -173,10 +169,8 @@ void machine_restart(char * cmd)
p
=
strchr
(
reboot_command
,
'\n'
);
p
=
strchr
(
reboot_command
,
'\n'
);
if
(
p
)
*
p
=
0
;
if
(
p
)
*
p
=
0
;
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
if
(
cmd
)
if
(
cmd
)
prom_reboot
(
cmd
);
prom_reboot
(
cmd
);
if
(
*
reboot_command
)
if
(
*
reboot_command
)
...
...
arch/sparc/kernel/setup.c
View file @
d837cda3
...
@@ -69,9 +69,7 @@ struct screen_info screen_info = {
...
@@ -69,9 +69,7 @@ struct screen_info screen_info = {
extern
unsigned
long
trapbase
;
extern
unsigned
long
trapbase
;
extern
int
serial_console
;
extern
int
serial_console
;
extern
void
breakpoint
(
void
);
extern
void
breakpoint
(
void
);
#if CONFIG_SUN_CONSOLE
void
(
*
prom_palette
)(
int
);
void
(
*
prom_palette
)(
int
);
#endif
asmlinkage
void
sys_sync
(
void
);
/* it's really int */
asmlinkage
void
sys_sync
(
void
);
/* it's really int */
/* Pretty sick eh? */
/* Pretty sick eh? */
...
@@ -87,10 +85,8 @@ void prom_sync_me(void)
...
@@ -87,10 +85,8 @@ void prom_sync_me(void)
"nop
\n\t
"
"nop
\n\t
"
"nop
\n\t
"
:
:
"r"
(
&
trapbase
));
"nop
\n\t
"
:
:
"r"
(
&
trapbase
));
#ifdef CONFIG_SUN_CONSOLE
if
(
prom_palette
)
if
(
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
prom_printf
(
"PROM SYNC COMMAND...
\n
"
);
prom_printf
(
"PROM SYNC COMMAND...
\n
"
);
show_free_areas
();
show_free_areas
();
if
(
current
->
pid
!=
0
)
{
if
(
current
->
pid
!=
0
)
{
...
@@ -118,9 +114,7 @@ unsigned int boot_flags __initdata = 0;
...
@@ -118,9 +114,7 @@ unsigned int boot_flags __initdata = 0;
#define BOOTME_KGDBB 0x8
#define BOOTME_KGDBB 0x8
#define BOOTME_KGDB 0xc
#define BOOTME_KGDB 0xc
#ifdef CONFIG_SUN_CONSOLE
static
int
console_fb
__initdata
=
0
;
static
int
console_fb
__initdata
=
0
;
#endif
/* Exported for mm/init.c:paging_init. */
/* Exported for mm/init.c:paging_init. */
unsigned
long
cmdline_memory_size
__initdata
=
0
;
unsigned
long
cmdline_memory_size
__initdata
=
0
;
...
@@ -221,7 +215,6 @@ static void __init boot_flags_init(char *commands)
...
@@ -221,7 +215,6 @@ static void __init boot_flags_init(char *commands)
}
}
commands
+=
9
;
commands
+=
9
;
}
else
{
}
else
{
#if CONFIG_SUN_CONSOLE
if
(
!
strncmp
(
commands
,
"console="
,
8
))
{
if
(
!
strncmp
(
commands
,
"console="
,
8
))
{
commands
+=
8
;
commands
+=
8
;
if
(
!
strncmp
(
commands
,
"ttya"
,
4
))
{
if
(
!
strncmp
(
commands
,
"ttya"
,
4
))
{
...
@@ -242,9 +235,7 @@ static void __init boot_flags_init(char *commands)
...
@@ -242,9 +235,7 @@ static void __init boot_flags_init(char *commands)
}
else
{
}
else
{
console_fb
=
1
;
console_fb
=
1
;
}
}
}
else
}
else
if
(
!
strncmp
(
commands
,
"mem="
,
4
))
{
#endif
if
(
!
strncmp
(
commands
,
"mem="
,
4
))
{
/*
/*
* "mem=XXX[kKmM] overrides the PROM-reported
* "mem=XXX[kKmM] overrides the PROM-reported
* memory size.
* memory size.
...
...
arch/sparc/prom/misc.c
View file @
d837cda3
...
@@ -46,10 +46,8 @@ prom_feval(char *fstring)
...
@@ -46,10 +46,8 @@ prom_feval(char *fstring)
}
}
/* We want to do this more nicely some day. */
/* We want to do this more nicely some day. */
#ifdef CONFIG_SUN_CONSOLE
extern
void
(
*
prom_palette
)(
int
);
extern
void
(
*
prom_palette
)(
int
);
extern
int
serial_console
;
extern
int
serial_console
;
#endif
/* Drop into the prom, with the chance to continue with the 'go'
/* Drop into the prom, with the chance to continue with the 'go'
* prom command.
* prom command.
...
@@ -63,10 +61,8 @@ prom_cmdline(void)
...
@@ -63,10 +61,8 @@ prom_cmdline(void)
unsigned
long
flags
;
unsigned
long
flags
;
kernel_enter_debugger
();
kernel_enter_debugger
();
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
install_obp_ticker
();
install_obp_ticker
();
spin_lock_irqsave
(
&
prom_lock
,
flags
);
spin_lock_irqsave
(
&
prom_lock
,
flags
);
(
*
(
romvec
->
pv_abort
))();
(
*
(
romvec
->
pv_abort
))();
...
@@ -76,10 +72,8 @@ prom_cmdline(void)
...
@@ -76,10 +72,8 @@ prom_cmdline(void)
#ifdef CONFIG_SUN_AUXIO
#ifdef CONFIG_SUN_AUXIO
TURN_ON_LED
;
TURN_ON_LED
;
#endif
#endif
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
0
);
prom_palette
(
0
);
#endif
}
}
/* Drop into the prom, but completely terminate the program.
/* Drop into the prom, but completely terminate the program.
...
...
arch/sparc64/kernel/process.c
View file @
d837cda3
...
@@ -109,18 +109,14 @@ int cpu_idle(void)
...
@@ -109,18 +109,14 @@ int cpu_idle(void)
extern
char
reboot_command
[];
extern
char
reboot_command
[];
#ifdef CONFIG_SUN_CONSOLE
extern
void
(
*
prom_palette
)(
int
);
extern
void
(
*
prom_palette
)(
int
);
extern
int
serial_console
;
extern
int
serial_console
;
#endif
extern
void
(
*
prom_keyboard
)(
void
);
extern
void
(
*
prom_keyboard
)(
void
);
void
machine_halt
(
void
)
void
machine_halt
(
void
)
{
{
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
if
(
prom_keyboard
)
if
(
prom_keyboard
)
prom_keyboard
();
prom_keyboard
();
prom_halt
();
prom_halt
();
...
@@ -129,10 +125,8 @@ void machine_halt(void)
...
@@ -129,10 +125,8 @@ void machine_halt(void)
void
machine_alt_power_off
(
void
)
void
machine_alt_power_off
(
void
)
{
{
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
if
(
prom_keyboard
)
if
(
prom_keyboard
)
prom_keyboard
();
prom_keyboard
();
prom_halt_power_off
();
prom_halt_power_off
();
...
@@ -145,10 +139,8 @@ void machine_restart(char * cmd)
...
@@ -145,10 +139,8 @@ void machine_restart(char * cmd)
p
=
strchr
(
reboot_command
,
'\n'
);
p
=
strchr
(
reboot_command
,
'\n'
);
if
(
p
)
*
p
=
0
;
if
(
p
)
*
p
=
0
;
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
if
(
prom_keyboard
)
if
(
prom_keyboard
)
prom_keyboard
();
prom_keyboard
();
if
(
cmd
)
if
(
cmd
)
...
...
arch/sparc64/kernel/setup.c
View file @
d837cda3
...
@@ -65,9 +65,7 @@ struct screen_info screen_info = {
...
@@ -65,9 +65,7 @@ struct screen_info screen_info = {
* prints out pretty messages and returns.
* prints out pretty messages and returns.
*/
*/
#if CONFIG_SUN_CONSOLE
void
(
*
prom_palette
)(
int
);
void
(
*
prom_palette
)(
int
);
#endif
void
(
*
prom_keyboard
)(
void
);
void
(
*
prom_keyboard
)(
void
);
asmlinkage
void
sys_sync
(
void
);
/* it's really int */
asmlinkage
void
sys_sync
(
void
);
/* it's really int */
...
@@ -322,9 +320,7 @@ unsigned int boot_flags = 0;
...
@@ -322,9 +320,7 @@ unsigned int boot_flags = 0;
#define BOOTME_SINGLE 0x2
#define BOOTME_SINGLE 0x2
#define BOOTME_KGDB 0x4
#define BOOTME_KGDB 0x4
#ifdef CONFIG_SUN_CONSOLE
static
int
console_fb
__initdata
=
0
;
static
int
console_fb
__initdata
=
0
;
#endif
/* Exported for mm/init.c:paging_init. */
/* Exported for mm/init.c:paging_init. */
unsigned
long
cmdline_memory_size
=
0
;
unsigned
long
cmdline_memory_size
=
0
;
...
@@ -413,7 +409,6 @@ static void __init boot_flags_init(char *commands)
...
@@ -413,7 +409,6 @@ static void __init boot_flags_init(char *commands)
}
}
commands
+=
9
;
commands
+=
9
;
}
else
{
}
else
{
#if CONFIG_SUN_CONSOLE
if
(
!
strncmp
(
commands
,
"console="
,
8
))
{
if
(
!
strncmp
(
commands
,
"console="
,
8
))
{
commands
+=
8
;
commands
+=
8
;
if
(
!
strncmp
(
commands
,
"ttya"
,
4
))
{
if
(
!
strncmp
(
commands
,
"ttya"
,
4
))
{
...
@@ -434,9 +429,7 @@ static void __init boot_flags_init(char *commands)
...
@@ -434,9 +429,7 @@ static void __init boot_flags_init(char *commands)
}
else
{
}
else
{
console_fb
=
1
;
console_fb
=
1
;
}
}
}
else
}
else
if
(
!
strncmp
(
commands
,
"mem="
,
4
))
{
#endif
if
(
!
strncmp
(
commands
,
"mem="
,
4
))
{
/*
/*
* "mem=XXX[kKmM]" overrides the PROM-reported
* "mem=XXX[kKmM]" overrides the PROM-reported
* memory size.
* memory size.
...
...
arch/sparc64/prom/misc.c
View file @
d837cda3
...
@@ -16,28 +16,24 @@
...
@@ -16,28 +16,24 @@
#include <asm/oplib.h>
#include <asm/oplib.h>
/* Reset and reboot the machine with the command 'bcommand'. */
/* Reset and reboot the machine with the command 'bcommand'. */
void
void
prom_reboot
(
char
*
bcommand
)
prom_reboot
(
char
*
bcommand
)
{
{
p1275_cmd
(
"boot"
,
P1275_ARG
(
0
,
P1275_ARG_IN_STRING
)
|
p1275_cmd
(
"boot"
,
P1275_ARG
(
0
,
P1275_ARG_IN_STRING
)
|
P1275_INOUT
(
1
,
0
),
bcommand
);
P1275_INOUT
(
1
,
0
),
bcommand
);
}
}
/* Forth evaluate the expression contained in 'fstring'. */
/* Forth evaluate the expression contained in 'fstring'. */
void
void
prom_feval
(
char
*
fstring
)
prom_feval
(
char
*
fstring
)
{
{
if
(
!
fstring
||
fstring
[
0
]
==
0
)
if
(
!
fstring
||
fstring
[
0
]
==
0
)
return
;
return
;
p1275_cmd
(
"interpret"
,
P1275_ARG
(
0
,
P1275_ARG_IN_STRING
)
|
p1275_cmd
(
"interpret"
,
P1275_ARG
(
0
,
P1275_ARG_IN_STRING
)
|
P1275_INOUT
(
1
,
1
),
fstring
);
P1275_INOUT
(
1
,
1
),
fstring
);
}
}
/* We want to do this more nicely some day. */
/* We want to do this more nicely some day. */
#ifdef CONFIG_SUN_CONSOLE
extern
void
(
*
prom_palette
)(
int
);
extern
void
(
*
prom_palette
)(
int
);
extern
int
serial_console
;
extern
int
serial_console
;
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
extern
void
smp_capture
(
void
);
extern
void
smp_capture
(
void
);
...
@@ -47,32 +43,27 @@ extern void smp_release(void);
...
@@ -47,32 +43,27 @@ extern void smp_release(void);
/* Drop into the prom, with the chance to continue with the 'go'
/* Drop into the prom, with the chance to continue with the 'go'
* prom command.
* prom command.
*/
*/
void
void
prom_cmdline
(
void
)
prom_cmdline
(
void
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
1
);
prom_palette
(
1
);
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
smp_capture
();
smp_capture
();
#endif
#endif
p1275_cmd
(
"enter"
,
P1275_INOUT
(
0
,
0
));
p1275_cmd
(
"enter"
,
P1275_INOUT
(
0
,
0
));
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
smp_release
();
smp_release
();
#endif
#endif
#ifdef CONFIG_SUN_CONSOLE
if
(
!
serial_console
&&
prom_palette
)
if
(
!
serial_console
&&
prom_palette
)
prom_palette
(
0
);
prom_palette
(
0
);
#endif
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
}
}
...
@@ -84,74 +75,69 @@ extern void smp_promstop_others(void);
...
@@ -84,74 +75,69 @@ extern void smp_promstop_others(void);
/* Drop into the prom, but completely terminate the program.
/* Drop into the prom, but completely terminate the program.
* No chance of continuing.
* No chance of continuing.
*/
*/
void
void
prom_halt
(
void
)
prom_halt
(
void
)
{
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
smp_promstop_others
();
smp_promstop_others
();
udelay
(
8000
);
udelay
(
8000
);
#endif
#endif
again:
again:
p1275_cmd
(
"exit"
,
P1275_INOUT
(
0
,
0
));
p1275_cmd
(
"exit"
,
P1275_INOUT
(
0
,
0
));
goto
again
;
/* PROM is out to get me -DaveM */
goto
again
;
/* PROM is out to get me -DaveM */
}
}
void
void
prom_halt_power_off
(
void
)
prom_halt_power_off
(
void
)
{
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
smp_promstop_others
();
smp_promstop_others
();
udelay
(
8000
);
udelay
(
8000
);
#endif
#endif
p1275_cmd
(
"SUNW,power-off"
,
P1275_INOUT
(
0
,
0
));
p1275_cmd
(
"SUNW,power-off"
,
P1275_INOUT
(
0
,
0
));
/* if nothing else helps, we just halt */
/* if nothing else helps, we just halt */
prom_halt
();
prom_halt
();
}
}
/* Set prom sync handler to call function 'funcp'. */
/* Set prom sync handler to call function 'funcp'. */
void
void
prom_setcallback
(
callback_func_t
funcp
)
prom_setcallback
(
callback_func_t
funcp
)
{
{
if
(
!
funcp
)
return
;
if
(
!
funcp
)
p1275_cmd
(
"set-callback"
,
P1275_ARG
(
0
,
P1275_ARG_IN_FUNCTION
)
|
return
;
P1275_INOUT
(
1
,
1
),
funcp
);
p1275_cmd
(
"set-callback"
,
P1275_ARG
(
0
,
P1275_ARG_IN_FUNCTION
)
|
P1275_INOUT
(
1
,
1
),
funcp
);
}
}
/* Get the idprom and stuff it into buffer 'idbuf'. Returns the
/* Get the idprom and stuff it into buffer 'idbuf'. Returns the
* format type. 'num_bytes' is the number of bytes that your idbuf
* format type. 'num_bytes' is the number of bytes that your idbuf
* has space for. Returns 0xff on error.
* has space for. Returns 0xff on error.
*/
*/
unsigned
char
unsigned
char
prom_get_idprom
(
char
*
idbuf
,
int
num_bytes
)
prom_get_idprom
(
char
*
idbuf
,
int
num_bytes
)
{
{
int
len
;
int
len
;
len
=
prom_getproplen
(
prom_root_node
,
"idprom"
);
len
=
prom_getproplen
(
prom_root_node
,
"idprom"
);
if
((
len
>
num_bytes
)
||
(
len
==-
1
))
return
0xff
;
if
((
len
>
num_bytes
)
||
(
len
==
-
1
))
if
(
!
prom_getproperty
(
prom_root_node
,
"idprom"
,
idbuf
,
num_bytes
))
return
0xff
;
if
(
!
prom_getproperty
(
prom_root_node
,
"idprom"
,
idbuf
,
num_bytes
))
return
idbuf
[
0
];
return
idbuf
[
0
];
return
0xff
;
return
0xff
;
}
}
/* Get the major prom version number. */
/* Get the major prom version number. */
int
int
prom_version
(
void
)
prom_version
(
void
)
{
{
return
PROM_P1275
;
return
PROM_P1275
;
}
}
/* Get the prom plugin-revision. */
/* Get the prom plugin-revision. */
int
int
prom_getrev
(
void
)
prom_getrev
(
void
)
{
{
return
prom_rev
;
return
prom_rev
;
}
}
/* Get the prom firmware print revision. */
/* Get the prom firmware print revision. */
int
int
prom_getprev
(
void
)
prom_getprev
(
void
)
{
{
return
prom_prev
;
return
prom_prev
;
}
}
...
@@ -173,7 +159,7 @@ int prom_get_mmu_ihandle(void)
...
@@ -173,7 +159,7 @@ int prom_get_mmu_ihandle(void)
node
=
prom_finddevice
(
"/chosen"
);
node
=
prom_finddevice
(
"/chosen"
);
ret
=
prom_getint
(
node
,
"mmu"
);
ret
=
prom_getint
(
node
,
"mmu"
);
if
(
ret
==
-
1
||
ret
==
0
)
if
(
ret
==
-
1
||
ret
==
0
)
mmu_ihandle_cache
=
-
1
;
mmu_ihandle_cache
=
-
1
;
else
else
mmu_ihandle_cache
=
ret
;
mmu_ihandle_cache
=
ret
;
...
@@ -284,7 +270,7 @@ unsigned long prom_retain(char *name,
...
@@ -284,7 +270,7 @@ unsigned long prom_retain(char *name,
/* If align is zero, the pa_low/pa_high args are passed,
/* If align is zero, the pa_low/pa_high args are passed,
* else they are not.
* else they are not.
*/
*/
if
(
align
==
0
)
if
(
align
==
0
)
return
p1275_cmd
(
"SUNW,retain"
,
return
p1275_cmd
(
"SUNW,retain"
,
(
P1275_ARG
(
0
,
P1275_ARG_IN_BUF
)
|
P1275_INOUT
(
5
,
2
)),
(
P1275_ARG
(
0
,
P1275_ARG_IN_BUF
)
|
P1275_INOUT
(
5
,
2
)),
name
,
pa_low
,
pa_high
,
size
,
align
);
name
,
pa_low
,
pa_high
,
size
,
align
);
...
...
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