linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Mon, 27 Jun 2005 09:34:33 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/06/27 09:34:27

Modified files:
        arch/mips/sgi-ip27: ip27-console.c 

Log message:
        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().

diff -urN linux/arch/mips/sgi-ip27/ip27-console.c 
linux/arch/mips/sgi-ip27/ip27-console.c
--- linux/arch/mips/sgi-ip27/ip27-console.c     2003/12/02 04:52:19     1.6
+++ linux/arch/mips/sgi-ip27/ip27-console.c     2005/06/27 08:34:27     1.7
@@ -30,8 +30,10 @@
 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;
 }

<Prev in Thread] Current Thread [Next in Thread>