Commit 61946127 authored by Sunil V L's avatar Sunil V L Committed by Palmer Dabbelt

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: default avatarSunil V L <sunilvl@ventanamicro.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Reviewed-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20230515054928.2079268-12-sunilvl@ventanamicro.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent e6b9d8ed
...@@ -70,7 +70,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) ...@@ -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; struct device_node *dn;
unsigned long hart; unsigned long hart;
...@@ -116,6 +116,11 @@ void __init setup_smp(void) ...@@ -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) static int start_secondary_cpu(int cpu, struct task_struct *tidle)
{ {
if (cpu_ops[cpu]->cpu_start) if (cpu_ops[cpu]->cpu_start)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment