]> err.no Git - linux-2.6/commitdiff
Using get_nasid() to find the console node will blow up nicely if
authorRalf Baechle <ralf@linux-mips.org>
Mon, 27 Jun 2005 08:34:27 +0000 (08:34 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:31:31 +0000 (19:31 +0100)
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>
arch/mips/sgi-ip27/ip27-console.c

index d97f5b5ef844dddc62b9642ba57efd4c74b23152..3e1ac299b80471372cf2972f1e697d512859afef 100644 (file)
 static inline struct ioc3_uartregs *console_uart(void)
 {
        struct ioc3 *ioc3;
+       nasid_t nasid;
 
-       ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(get_nasid())->memory_base;
+       nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
+       ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
 
        return &ioc3->sregs.uarta;
 }