diff options
author | Sunil V L <sunilvl@ventanamicro.com> | 2023-05-15 11:19:18 +0530 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-06-01 08:45:05 -0700 |
commit | 61946127ab49d0bb47786b8de2aff73a051e054f (patch) | |
tree | e74fa636b6eea9f7db8c2f32c658f6dfc95e1da4 /arch/riscv | |
parent | e6b9d8eddb1772d99a676a906d42865293934edd (diff) | |
download | linux-stable-61946127ab49d0bb47786b8de2aff73a051e054f.tar.gz linux-stable-61946127ab49d0bb47786b8de2aff73a051e054f.tar.bz2 linux-stable-61946127ab49d0bb47786b8de2aff73a051e054f.zip |
RISC-V: smpboot: Create wrapper setup_smp()
setup_smp() currently assumes DT-based platforms. To enable ACPI,
first make this a wrapper function and move existing code to
a separate DT-specific function.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20230515054928.2079268-12-sunilvl@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/kernel/smpboot.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 445a4efee267..a2e66126b733 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -70,7 +70,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) } } -void __init setup_smp(void) +static void __init of_parse_and_init_cpus(void) { struct device_node *dn; unsigned long hart; @@ -116,6 +116,11 @@ void __init setup_smp(void) } } +void __init setup_smp(void) +{ + of_parse_and_init_cpus(); +} + static int start_secondary_cpu(int cpu, struct task_struct *tidle) { if (cpu_ops[cpu]->cpu_start) |