[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] arm/smpboot: Move dt specific code in smp to seperate functions
commit eaf1de3d66de73508895fee947e229b539ff3ac5 Author: Shannon Zhao <shannon.zhao@xxxxxxxxxx> AuthorDate: Sat Jan 23 16:00:16 2016 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Feb 3 11:57:13 2016 +0000 arm/smpboot: Move dt specific code in smp to seperate functions Partition smp initialization functions into generic and dt specific parts, this will be useful when introducing new functions for smp initialization based on acpi. Signed-off-by: Parth Dixit <parth.dixit@xxxxxxxxxx> Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> --- xen/arch/arm/arm64/smpboot.c | 7 ++++++- xen/arch/arm/smpboot.c | 29 ++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c index 62e6abb..7928f69 100644 --- a/xen/arch/arm/arm64/smpboot.c +++ b/xen/arch/arm/arm64/smpboot.c @@ -70,7 +70,7 @@ int __init arch_smp_init(void) return 0; } -int __init arch_cpu_init(int cpu, struct dt_device_node *dn) +static int __init dt_arch_cpu_init(int cpu, struct dt_device_node *dn) { const char *enable_method; @@ -94,6 +94,11 @@ int __init arch_cpu_init(int cpu, struct dt_device_node *dn) return 0; } +int __init arch_cpu_init(int cpu, struct dt_device_node *dn) +{ + return dt_arch_cpu_init(cpu, dn); +} + int __init arch_cpu_up(int cpu) { if ( !smp_enable_ops[cpu].prepare_cpu ) diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index 00b2b2a..b6119d1 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -92,7 +92,7 @@ smp_clear_cpu_maps (void) * MPIDR values related to logical cpus * Code base on Linux arch/arm/kernel/devtree.c */ -void __init smp_init_cpus(void) +static void __init dt_smp_init_cpus(void) { register_t mpidr; struct dt_device_node *cpus = dt_find_node_by_path("/cpus"); @@ -106,16 +106,6 @@ void __init smp_init_cpus(void) bool_t bootcpu_valid = 0; int rc; - /* scan the DTB for a PSCI node and set a global variable */ - psci_init(); - - if ( (rc = arch_smp_init()) < 0 ) - { - printk(XENLOG_WARNING "SMP init failed (%d)\n" - "Using only 1 CPU\n", rc); - return; - } - mpidr = boot_cpu_data.mpidr.bits & MPIDR_HWID_MASK; if ( !cpus ) @@ -243,6 +233,23 @@ void __init smp_init_cpus(void) } } +void __init smp_init_cpus(void) +{ + int rc; + + /* initialize PSCI and set a global variable */ + psci_init(); + + if ( (rc = arch_smp_init()) < 0 ) + { + printk(XENLOG_WARNING "SMP init failed (%d)\n" + "Using only 1 CPU\n", rc); + return; + } + + dt_smp_init_cpus(); +} + int __init smp_get_max_cpus (void) { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |