[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 05 of 11] arm: start plumbing in SMP bringup in C
# HG changeset patch # User Tim Deegan <tim@xxxxxxx> # Date 1331311595 0 # Node ID 33d06f47c02a321572c3e5ba16f1f5be0a55cf2e # Parent 5254b3d4015ee4ee9e1eb51c0329b2e88c6b64fc arm: start plumbing in SMP bringup in C Still a noop, but no longer just a dummy symbol. Signed-off-by: Tim Deegan <tim@xxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> diff -r 5254b3d4015e -r 33d06f47c02a xen/arch/arm/dummy.S --- a/xen/arch/arm/dummy.S Fri Mar 09 16:46:35 2012 +0000 +++ b/xen/arch/arm/dummy.S Fri Mar 09 16:46:35 2012 +0000 @@ -7,9 +7,6 @@ x: .word 0xe7f000f0 /* Undefined instruc x: mov pc, lr /* SMP support */ -DUMMY(__cpu_die); -DUMMY(__cpu_disable); -DUMMY(__cpu_up); DUMMY(per_cpu__cpu_core_mask); DUMMY(per_cpu__cpu_sibling_mask); DUMMY(node_online_map); diff -r 5254b3d4015e -r 33d06f47c02a xen/arch/arm/setup.c --- a/xen/arch/arm/setup.c Fri Mar 09 16:46:35 2012 +0000 +++ b/xen/arch/arm/setup.c Fri Mar 09 16:46:35 2012 +0000 @@ -38,9 +38,6 @@ #include <asm/setup.h> #include "gic.h" -/* maxcpus: maximum number of CPUs to activate. */ -static unsigned int __initdata max_cpus = NR_CPUS; - /* Xen stack for bringing up the first CPU. */ unsigned char __initdata init_stack[STACK_SIZE] __attribute__((__aligned__(STACK_SIZE))); @@ -204,7 +201,7 @@ void __init start_xen(unsigned long boot __set_current((struct vcpu *)0xfffff000); /* debug sanity */ idle_vcpu[0] = current; - smp_prepare_cpus(max_cpus); + smp_prepare_cpus(cpus); init_xen_time(); @@ -251,7 +248,7 @@ void __init start_xen(unsigned long boot for_each_present_cpu ( i ) { - if ( (num_online_cpus() < max_cpus) && !cpu_online(i) ) + if ( (num_online_cpus() < cpus) && !cpu_online(i) ) { int ret = cpu_up(i); if ( ret != 0 ) diff -r 5254b3d4015e -r 33d06f47c02a xen/arch/arm/smpboot.c --- a/xen/arch/arm/smpboot.c Fri Mar 09 16:46:35 2012 +0000 +++ b/xen/arch/arm/smpboot.c Fri Mar 09 16:46:35 2012 +0000 @@ -19,6 +19,7 @@ #include <xen/cpumask.h> #include <xen/smp.h> #include <xen/init.h> +#include <xen/errno.h> cpumask_t cpu_online_map; EXPORT_SYMBOL(cpu_online_map); @@ -30,16 +31,40 @@ EXPORT_SYMBOL(cpu_possible_map); void __init smp_prepare_cpus (unsigned int max_cpus) { - set_processor_id(0); /* needed early, for smp_processor_id() */ + int i; + set_processor_id(0); /* needed early, for smp_processor_id() */ - cpumask_clear(&cpu_online_map); - cpumask_clear(&cpu_present_map); - cpumask_clear(&cpu_possible_map); - cpumask_set_cpu(0, &cpu_online_map); - cpumask_set_cpu(0, &cpu_present_map); - cpumask_set_cpu(0, &cpu_possible_map); - return; + cpumask_clear(&cpu_online_map); + cpumask_set_cpu(0, &cpu_online_map); + + cpumask_clear(&cpu_possible_map); + for ( i = 0; i < max_cpus; i++ ) + cpumask_set_cpu(i, &cpu_possible_map); + cpumask_copy(&cpu_present_map, &cpu_possible_map); } + +/* Bring up a non-boot CPU */ +int __cpu_up(unsigned int cpu) +{ + /* Not yet... */ + return -ENODEV; +} + +/* Shut down the current CPU */ +void __cpu_disable(void) +{ + /* TODO: take down timers, GIC, &c. */ + BUG(); +} + +/* Wait for a remote CPU to die */ +void __cpu_die(unsigned int cpu) +{ + /* TODO: interlock with __cpu_disable */ + BUG(); +} + + /* * Local variables: * mode: C _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |