aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-06-27 04:34:27 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:31 -0400
commit01d42abdf3c35c2ae820bb9305174aa75492975b (patch)
tree15a05fd40bdbc705bab461e55eec423256085e75 /arch
parentc4559f67b73d6c34fde0faac5c6c890a2cf3527c (diff)
Using get_nasid() to find the console node will blow up nicely if
called on a another node than the console node, so use the master_nasid instead and in the unlikely case that one isn't initialized yet, fall back to get_nasid(). Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/sgi-ip27/ip27-console.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/sgi-ip27/ip27-console.c b/arch/mips/sgi-ip27/ip27-console.c
index d97f5b5ef844..3e1ac299b804 100644
--- a/arch/mips/sgi-ip27/ip27-console.c
+++ b/arch/mips/sgi-ip27/ip27-console.c
@@ -30,8 +30,10 @@
30static inline struct ioc3_uartregs *console_uart(void) 30static inline struct ioc3_uartregs *console_uart(void)
31{ 31{
32 struct ioc3 *ioc3; 32 struct ioc3 *ioc3;
33 nasid_t nasid;
33 34
34 ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(get_nasid())->memory_base; 35 nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
36 ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
35 37
36 return &ioc3->sregs.uarta; 38 return &ioc3->sregs.uarta;
37} 39}