[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07 of 10] arm: start plumbing in SMP bringup in C
On Thu, 2012-02-23 at 17:40 +0000, Tim Deegan wrote: > # HG changeset patch > # User Tim Deegan <tim@xxxxxxx> > # Date 1330018799 0 > # Node ID fd78d23ba19de4129e21cdc7303848b105057227 > # Parent 3b1d7a91a2596baca178e8b5610b3cbc299fa5ea > 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 3b1d7a91a259 -r fd78d23ba19d xen/arch/arm/dummy.S > --- a/xen/arch/arm/dummy.S Thu Feb 23 17:39:59 2012 +0000 > +++ b/xen/arch/arm/dummy.S Thu Feb 23 17:39:59 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 3b1d7a91a259 -r fd78d23ba19d xen/arch/arm/setup.c > --- a/xen/arch/arm/setup.c Thu Feb 23 17:39:59 2012 +0000 > +++ b/xen/arch/arm/setup.c Thu Feb 23 17:39:59 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))); > > @@ -206,7 +203,7 @@ void __init start_xen(unsigned long boot > cpumask_set_cpu(smp_processor_id(), &cpu_online_map); > cpumask_set_cpu(smp_processor_id(), &cpu_present_map); > > - smp_prepare_cpus(max_cpus); > + smp_prepare_cpus(cpus); > > init_xen_time(); > > @@ -253,7 +250,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 3b1d7a91a259 -r fd78d23ba19d xen/arch/arm/smpboot.c > --- a/xen/arch/arm/smpboot.c Thu Feb 23 17:39:59 2012 +0000 > +++ b/xen/arch/arm/smpboot.c Thu Feb 23 17:39:59 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 |