aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/process.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-07-20 19:59:26 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-20 19:59:26 -0400
commitc73fcc846c91f53fd2c67fd9c6c04888a9e5892e (patch)
tree31faa68b4176636756926535a0f50ff780973275 /arch/sparc/kernel/process.c
parentede13d81b4dda409a6d271b34b8e2ec9383e255d (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/sparc/kernel/process.c')
-rw-r--r--arch/sparc/kernel/process.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 8c37f8f5adb7..33f7a3ddb104 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -39,6 +39,7 @@
39#include <asm/processor.h> 39#include <asm/processor.h>
40#include <asm/psr.h> 40#include <asm/psr.h>
41#include <asm/elf.h> 41#include <asm/elf.h>
42#include <asm/prom.h>
42#include <asm/unistd.h> 43#include <asm/unistd.h>
43 44
44/* 45/*
@@ -150,7 +151,7 @@ void machine_halt(void)
150 local_irq_enable(); 151 local_irq_enable();
151 mdelay(8); 152 mdelay(8);
152 local_irq_disable(); 153 local_irq_disable();
153 if (!serial_console && prom_palette) 154 if (prom_palette)
154 prom_palette (1); 155 prom_palette (1);
155 prom_halt(); 156 prom_halt();
156 panic("Halt failed!"); 157 panic("Halt failed!");
@@ -166,7 +167,7 @@ void machine_restart(char * cmd)
166 167
167 p = strchr (reboot_command, '\n'); 168 p = strchr (reboot_command, '\n');
168 if (p) *p = 0; 169 if (p) *p = 0;
169 if (!serial_console && prom_palette) 170 if (prom_palette)
170 prom_palette (1); 171 prom_palette (1);
171 if (cmd) 172 if (cmd)
172 prom_reboot(cmd); 173 prom_reboot(cmd);
@@ -179,7 +180,8 @@ void machine_restart(char * cmd)
179void machine_power_off(void) 180void machine_power_off(void)
180{ 181{
181#ifdef CONFIG_SUN_AUXIO 182#ifdef CONFIG_SUN_AUXIO
182 if (auxio_power_register && (!serial_console || scons_pwroff)) 183 if (auxio_power_register &&
184 (strcmp(of_console_device->type, "serial") || scons_pwroff))
183 *auxio_power_register |= AUXIO_POWER_OFF; 185 *auxio_power_register |= AUXIO_POWER_OFF;
184#endif 186#endif
185 machine_halt(); 187 machine_halt();