diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-20 19:59:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-20 19:59:26 -0400 |
commit | c73fcc846c91f53fd2c67fd9c6c04888a9e5892e (patch) | |
tree | 31faa68b4176636756926535a0f50ff780973275 /arch/sparc64/kernel/process.c | |
parent | ede13d81b4dda409a6d271b34b8e2ec9383e255d (diff) |
[SPARC]: Fix serial console device detection.
The current scheme works on static interpretation of text names, which
is wrong.
The output-device setting, for example, must be resolved via an alias
or similar to a full path name to the console device.
Paths also contain an optional set of 'options', which starts with a
colon at the end of the path. The option area is used to specify
which of two serial ports ('a' or 'b') the path refers to when a
device node drives multiple ports. 'a' is assumed if the option
specification is missing.
This was caught by the UltraSPARC-T1 simulator. The 'output-device'
property was set to 'ttya' and we didn't pick upon the fact that this
is an OBP alias set to '/virtual-devices/console'. Instead we saw it
as the first serial console device, instead of the hypervisor console.
The infrastructure is now there to take advantage of this to resolve
the console correctly even in multi-head situations in fbcon too.
Thanks to Greg Onufer for the bug report.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/process.c')
-rw-r--r-- | arch/sparc64/kernel/process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 93557507ec9f..fd7899ba1d70 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -119,7 +119,7 @@ extern void (*prom_keyboard)(void); | |||
119 | void machine_halt(void) | 119 | void machine_halt(void) |
120 | { | 120 | { |
121 | sstate_halt(); | 121 | sstate_halt(); |
122 | if (!serial_console && prom_palette) | 122 | if (prom_palette) |
123 | prom_palette (1); | 123 | prom_palette (1); |
124 | if (prom_keyboard) | 124 | if (prom_keyboard) |
125 | prom_keyboard(); | 125 | prom_keyboard(); |
@@ -130,7 +130,7 @@ void machine_halt(void) | |||
130 | void machine_alt_power_off(void) | 130 | void machine_alt_power_off(void) |
131 | { | 131 | { |
132 | sstate_poweroff(); | 132 | sstate_poweroff(); |
133 | if (!serial_console && prom_palette) | 133 | if (prom_palette) |
134 | prom_palette(1); | 134 | prom_palette(1); |
135 | if (prom_keyboard) | 135 | if (prom_keyboard) |
136 | prom_keyboard(); | 136 | prom_keyboard(); |
@@ -145,7 +145,7 @@ void machine_restart(char * cmd) | |||
145 | sstate_reboot(); | 145 | sstate_reboot(); |
146 | p = strchr (reboot_command, '\n'); | 146 | p = strchr (reboot_command, '\n'); |
147 | if (p) *p = 0; | 147 | if (p) *p = 0; |
148 | if (!serial_console && prom_palette) | 148 | if (prom_palette) |
149 | prom_palette (1); | 149 | prom_palette (1); |
150 | if (prom_keyboard) | 150 | if (prom_keyboard) |
151 | prom_keyboard(); | 151 | prom_keyboard(); |