Skip to content

Commit f40fe31

Browse files
liupingfanpalmer-dabbelt
authored andcommitted
riscv: cpu-hotplug: clear cpu from numa map when teardown
There is numa_add_cpu() when cpus online, accordingly, there should be numa_remove_cpu() when cpus offline. Signed-off-by: Pingfan Liu <[email protected]> Fixes: 4f0e8ee ("riscv: Add numa support for riscv64 platform") Cc: [email protected] [Palmer: Add missing NUMA include] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f81393a commit f40fe31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/kernel/cpu-hotplug.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/sched/hotplug.h>
1313
#include <asm/irq.h>
1414
#include <asm/cpu_ops.h>
15+
#include <asm/numa.h>
1516
#include <asm/sbi.h>
1617

1718
bool cpu_has_hotplug(unsigned int cpu)
@@ -40,6 +41,7 @@ int __cpu_disable(void)
4041
return ret;
4142

4243
remove_cpu_topology(cpu);
44+
numa_remove_cpu(cpu);
4345
set_cpu_online(cpu, false);
4446
irq_migrate_all_off_this_cpu();
4547

0 commit comments

Comments
 (0)