Skip to content

Commit

Permalink
RISC-V: smpboot: Create wrapper setup_smp()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sunil V L authored and Palmer Dabbelt committed Jun 1, 2023
1 parent e6b9d8e commit 6194612
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/riscv/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6194612

Please sign in to comment.