Skip to content

Commit

Permalink
MIPS: SGI-IP27: do xtalk scanning later
Browse files Browse the repository at this point in the history
Move xtalk scanning to a later boot stage to be able using things like
kmalloc and friends.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
  • Loading branch information
Thomas Bogendoerfer authored and Paul Burton committed Feb 19, 2019
1 parent ab68280 commit 9707b7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 0 additions & 3 deletions arch/mips/sgi-ip27/ip27-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ EXPORT_SYMBOL_GPL(sn_cpu_info);

extern void pcibr_setup(cnodeid_t);

extern void xtalk_probe_node(cnodeid_t nid);

static void per_hub_init(cnodeid_t cnode)
{
struct hub_data *hub = hub_data(cnode);
Expand All @@ -71,7 +69,6 @@ static void per_hub_init(cnodeid_t cnode)
REMOTE_HUB_S(nasid, IIO_ICTO, 0xff);

hub_rtc_init(cnode);
xtalk_probe_node(cnode);

#ifdef CONFIG_REPLICATE_EXHANDLERS
/*
Expand Down
13 changes: 12 additions & 1 deletion arch/mips/sgi-ip27/ip27-xtalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static int xbow_probe(nasid_t nasid)
return 0;
}

void xtalk_probe_node(cnodeid_t nid)
static void xtalk_probe_node(cnodeid_t nid)
{
volatile u64 hubreg;
nasid_t nasid;
Expand Down Expand Up @@ -133,3 +133,14 @@ void xtalk_probe_node(cnodeid_t nid)
break;
}
}

static int __init xtalk_init(void)
{
cnodeid_t cnode;

for_each_online_node(cnode)
xtalk_probe_node(cnode);

return 0;
}
arch_initcall(xtalk_init);

0 comments on commit 9707b7e

Please sign in to comment.