*/
#include <linux/init.h>
#include <linux/sched.h>
+#include <linux/nodemask.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm/sn/arch.h>
for (i = 0; i < MAXCPUS; i++)
cpuid_to_compact_node[i] = INVALID_CNODEID;
- numnodes = 0;
+ /*
+ * MCD - this whole "compact node" stuff can probably be dropped,
+ * as we can handle sparse numbering now
+ */
+ nodes_clear(node_online_map);
for (i = 0; i < MAX_COMPACT_NODES; i++) {
nasid_t nasid = gdap->g_nasidtable[i];
if (nasid == INVALID_NASID)
break;
compact_to_nasid_node[i] = nasid;
nasid_to_compact_node[nasid] = i;
- numnodes++;
+ node_set_online(num_online_nodes());
highest = do_cpumask(i, nasid, highest);
}
- printk("Discovered %d cpus on %d nodes\n", highest + 1, numnodes);
-}
-
-void __init prom_build_cpu_map(void)
-{
+ printk("Discovered %d cpus on %d nodes\n", highest + 1, num_online_nodes());
}
static void intr_clear_bits(nasid_t nasid, volatile hubreg_t *pend,
{
cnodeid_t cnode;
- for (cnode = 0; cnode < numnodes; cnode++)
+ for_each_online_node(cnode)
intr_clear_all(COMPACT_TO_NASID_NODEID(cnode));
- /* Master has already done per_cpu_init() */
- install_ipi();
-
- replicate_kernel_text(numnodes);
+ replicate_kernel_text();
/*
* Assumption to be fixed: we're always booted on logical / physical