From: Ralf Baechle Date: Mon, 27 Jun 2005 08:34:27 +0000 (+0000) Subject: Using get_nasid() to find the console node will blow up nicely if X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01d42abdf3c35c2ae820bb9305174aa75492975b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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 @@ 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; }