Skip to content

Commit fb7d751

Browse files
author
Martin Schwidefsky
committed
s390/numa: move initial setup of node_to_cpumask_map
The numa_init_early initcall sets the node_to_cpumask_map[0] to the full cpu_possible_mask. Unfortunately this early_initcall is too late, the NUMA setup for numa=emu is done even earlier. The order of calls is numa_setup() -> emu_update_cpu_topology(), then the early_initcalls(), followed by sched_init_domains(). Starting with git commit 051f3ca "sched/topology: Introduce NUMA identity node sched domain" the incorrect node_to_cpumask_map[0] really screws up the domain setup and the kernel panics with the follow oops: Cc: <[email protected]> # v4.15+ Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 8cce437 commit fb7d751

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

arch/s390/numa/numa.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,14 @@ void __init numa_setup(void)
134134
{
135135
pr_info("NUMA mode: %s\n", mode->name);
136136
nodes_clear(node_possible_map);
137+
/* Initially attach all possible CPUs to node 0. */
138+
cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask);
137139
if (mode->setup)
138140
mode->setup();
139141
numa_setup_memory();
140142
memblock_dump_all();
141143
}
142144

143-
/*
144-
* numa_init_early() - Initialization initcall
145-
*
146-
* This runs when only one CPU is online and before the first
147-
* topology update is called for by the scheduler.
148-
*/
149-
static int __init numa_init_early(void)
150-
{
151-
/* Attach all possible CPUs to node 0 for now. */
152-
cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask);
153-
return 0;
154-
}
155-
early_initcall(numa_init_early);
156-
157145
/*
158146
* numa_init_late() - Initialization initcall
159147
*

0 commit comments

Comments
 (0)