diff options
author | Pingfan Liu <kernelfans@gmail.com> | 2022-01-23 15:13:52 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-16 14:56:18 +0300 |
commit | efe220337181dabf0b6b852cb7f6d01c5313468e (patch) | |
tree | cbd60186ab1a6738220a5877e9cbd711faf181ec /arch | |
parent | 7486227fa47aa84b102be18fd9985f6e8e11e756 (diff) | |
download | linux-efe220337181dabf0b6b852cb7f6d01c5313468e.tar.xz |
riscv: cpu-hotplug: clear cpu from numa map when teardown
commit f40fe31c01445f31253b15bef2412b33ae31093b upstream.
There is numa_add_cpu() when cpus online, accordingly, there should be
numa_remove_cpu() when cpus offline.
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Fixes: 4f0e8eef772e ("riscv: Add numa support for riscv64 platform")
Cc: stable@vger.kernel.org
[Palmer: Add missing NUMA include]
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/kernel/cpu-hotplug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kernel/cpu-hotplug.c b/arch/riscv/kernel/cpu-hotplug.c index df84e0c13db1..66ddfba1cfbe 100644 --- a/arch/riscv/kernel/cpu-hotplug.c +++ b/arch/riscv/kernel/cpu-hotplug.c @@ -12,6 +12,7 @@ #include <linux/sched/hotplug.h> #include <asm/irq.h> #include <asm/cpu_ops.h> +#include <asm/numa.h> #include <asm/sbi.h> void cpu_stop(void); @@ -46,6 +47,7 @@ int __cpu_disable(void) return ret; remove_cpu_topology(cpu); + numa_remove_cpu(cpu); set_cpu_online(cpu, false); irq_migrate_all_off_this_cpu(); |