mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-09 03:20:05 +00:00
s390/numa: move initial setup of node_to_cpumask_map
commitfb7d7518b0upstream. 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 commit051f3ca02e"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: <stable@vger.kernel.org> # v4.15+ Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
97e3dcc08e
commit
2ac8fbd174
@@ -134,26 +134,14 @@ void __init numa_setup(void)
|
|||||||
{
|
{
|
||||||
pr_info("NUMA mode: %s\n", mode->name);
|
pr_info("NUMA mode: %s\n", mode->name);
|
||||||
nodes_clear(node_possible_map);
|
nodes_clear(node_possible_map);
|
||||||
|
/* Initially attach all possible CPUs to node 0. */
|
||||||
|
cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask);
|
||||||
if (mode->setup)
|
if (mode->setup)
|
||||||
mode->setup();
|
mode->setup();
|
||||||
numa_setup_memory();
|
numa_setup_memory();
|
||||||
memblock_dump_all();
|
memblock_dump_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* numa_init_early() - Initialization initcall
|
|
||||||
*
|
|
||||||
* This runs when only one CPU is online and before the first
|
|
||||||
* topology update is called for by the scheduler.
|
|
||||||
*/
|
|
||||||
static int __init numa_init_early(void)
|
|
||||||
{
|
|
||||||
/* Attach all possible CPUs to node 0 for now. */
|
|
||||||
cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
early_initcall(numa_init_early);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* numa_init_late() - Initialization initcall
|
* numa_init_late() - Initialization initcall
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user