aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv
diff options
context:
space:
mode:
authorPaul Walmsley <paul.walmsley@sifive.com>2019-08-30 10:39:38 -0700
committerPaul Walmsley <paul.walmsley@sifive.com>2019-08-30 10:39:38 -0700
commit015b269337e66120179f2da428a5195ec7a4675f (patch)
tree66277b0dedbdef8fa76f80d334c9b55b045c4514 /arch/riscv
parentRISC-V: Fix FIXMAP area corruption on RV32 systems (diff)
parentMAINTAINERS: Add an entry for generic architecture topology (diff)
downloadlinux-dev-015b269337e66120179f2da428a5195ec7a4675f.tar.xz
linux-dev-015b269337e66120179f2da428a5195ec7a4675f.zip
Merge tag 'common/for-v5.4-rc1/cpu-topology' into for-v5.4-rc1-branch
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/Kconfig1
-rw-r--r--arch/riscv/kernel/smpboot.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 59a4727ecd6c..86ee362a1375 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -48,6 +48,7 @@ config RISCV
select PCI_MSI if PCI
select RISCV_TIMER
select GENERIC_IRQ_MULTI_HANDLER
+ select GENERIC_ARCH_TOPOLOGY if SMP
select ARCH_HAS_PTE_SPECIAL
select ARCH_HAS_MMIOWB
select HAVE_EBPF_JIT if 64BIT
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 7462a44304fe..18ae6da5115e 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -8,6 +8,7 @@
* Copyright (C) 2017 SiFive
*/
+#include <linux/arch_topology.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -35,6 +36,7 @@ static DECLARE_COMPLETION(cpu_running);
void __init smp_prepare_boot_cpu(void)
{
+ init_cpu_topology();
}
void __init smp_prepare_cpus(unsigned int max_cpus)
@@ -138,6 +140,7 @@ asmlinkage void __init smp_callin(void)
trap_init();
notify_cpu_starting(smp_processor_id());
+ update_siblings_masks(smp_processor_id());
set_cpu_online(smp_processor_id(), 1);
/*
* Remote TLB flushes are ignored while the CPU is offline, so emit