]> Git Repo - J-linux.git/blob - arch/s390/kernel/numa.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / arch / s390 / kernel / numa.c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * NUMA support for s390
4  *
5  * Implement NUMA core code.
6  *
7  * Copyright IBM Corp. 2015
8  */
9
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>
15 #include <asm/numa.h>
16
17 void __init numa_setup(void)
18 {
19         int nid;
20
21         nodes_clear(node_possible_map);
22         node_set(0, node_possible_map);
23         node_set_online(0);
24         for (nid = 0; nid < MAX_NUMNODES; nid++) {
25                 NODE_DATA(nid) = memblock_alloc(sizeof(pg_data_t), 8);
26                 if (!NODE_DATA(nid))
27                         panic("%s: Failed to allocate %zu bytes align=0x%x\n",
28                               __func__, sizeof(pg_data_t), 8);
29         }
30         NODE_DATA(0)->node_spanned_pages = memblock_end_of_DRAM() >> PAGE_SHIFT;
31         NODE_DATA(0)->node_id = 0;
32 }
This page took 0.027735 seconds and 4 git commands to generate.