Skip to content

Commit

Permalink
Using get_nasid() to find the console node will blow up nicely if
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent c4559f6 commit 01d42ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/mips/sgi-ip27/ip27-console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 01d42ab

Please sign in to comment.