1 // SPDX-License-Identifier: GPL-2.0
3 * NUMA support for s390
5 * Implement NUMA core code.
7 * Copyright IBM Corp. 2015
10 #include <linux/kernel.h>
11 #include <linux/mmzone.h>
12 #include <linux/cpumask.h>
13 #include <linux/memblock.h>
14 #include <linux/node.h>
17 struct pglist_data *node_data[MAX_NUMNODES];
18 EXPORT_SYMBOL(node_data);
20 void __init numa_setup(void)
24 nodes_clear(node_possible_map);
25 node_set(0, node_possible_map);
27 for (nid = 0; nid < MAX_NUMNODES; nid++) {
28 NODE_DATA(nid) = memblock_alloc(sizeof(pg_data_t), 8);
30 panic("%s: Failed to allocate %zu bytes align=0x%x\n",
31 __func__, sizeof(pg_data_t), 8);
33 NODE_DATA(0)->node_spanned_pages = memblock_end_of_DRAM() >> PAGE_SHIFT;
34 NODE_DATA(0)->node_id = 0;
37 static int __init numa_init_late(void)
42 arch_initcall(numa_init_late);