aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/setup.c
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2015-05-13 09:12:47 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2015-05-19 11:09:29 -0400
commit0f0783365cbb7ec13a8f02198f6e1a146d94a5a9 (patch)
treebb22a64d655d11cac8135fb3852d2b28c63531e5 /arch/arm64/kernel/setup.c
parent819a88263d5dbe398edd59cc1cf725ed1fdcfd79 (diff)
ARM64: kernel: unify ACPI and DT cpus initialization
The code that initializes cpus on arm64 is currently split in two different code paths that carry out DT and ACPI cpus initialization. Most of the code executing SMP initialization is common and should be merged to reduce discrepancies between ACPI and DT initialization and to have code initializing cpus in a single common place in the kernel. This patch refactors arm64 SMP cpus initialization code to merge ACPI and DT boot paths in a common file and to create sanity checks that can be reused by both boot methods. Current code assumes PSCI is the only available boot method when arm64 boots with ACPI; this can be easily extended if/when the ACPI parking protocol is merged into the kernel. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Hanjun Guo <hanjun.guo@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Hanjun Guo <hanjun.guo@linaro.org> Tested-by: Mark Rutland <mark.rutland@arm.com> [DT] Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/setup.c')
-rw-r--r--arch/arm64/kernel/setup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 74753132c3ac..508cca1f8dce 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -408,16 +408,13 @@ void __init setup_arch(char **cmdline_p)
408 if (acpi_disabled) { 408 if (acpi_disabled) {
409 unflatten_device_tree(); 409 unflatten_device_tree();
410 psci_dt_init(); 410 psci_dt_init();
411 cpu_read_bootcpu_ops();
412#ifdef CONFIG_SMP
413 of_smp_init_cpus();
414#endif
415 } else { 411 } else {
416 psci_acpi_init(); 412 psci_acpi_init();
417 acpi_init_cpus();
418 } 413 }
419 414
415 cpu_read_bootcpu_ops();
420#ifdef CONFIG_SMP 416#ifdef CONFIG_SMP
417 smp_init_cpus();
421 smp_build_mpidr_hash(); 418 smp_build_mpidr_hash();
422#endif 419#endif
423 420