From: Stefano Stabellini Subject: Re: [PATCH 16/38] arm: Add simple cpu_{sibling, core}_mask Date: Wed, 6 Jun 2012 17:13:52 +0100 Message-ID: References: <1338565113.17466.141.camel@zakaz.uk.xensource.com> <1338565207-2888-1-git-send-email-ian.campbell@citrix.com> <1338565207-2888-16-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338565207-2888-16-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 1 Jun 2012, Ian Campbell wrote: > Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini > xen/arch/arm/dummy.S | 2 -- > xen/arch/arm/setup.c | 7 +++++++ > xen/arch/arm/smpboot.c | 5 +++++ > 3 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S > index c001e8d..03f7489 100644 > --- a/xen/arch/arm/dummy.S > +++ b/xen/arch/arm/dummy.S > @@ -7,8 +7,6 @@ x: .word 0xe7f000f0 /* Undefined instruction */ > x: mov pc, lr > > /* SMP support */ > -DUMMY(per_cpu__cpu_core_mask); > -DUMMY(per_cpu__cpu_sibling_mask); > DUMMY(node_online_map); > DUMMY(smp_send_state_dump); > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 81ababb..b0cfacc 100644 > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -230,6 +230,13 @@ void __init start_xen(unsigned long boot_phys_offset, > } > } > > + if ( !zalloc_cpumask_var(&per_cpu(cpu_sibling_mask, 0)) || > + !zalloc_cpumask_var(&per_cpu(cpu_core_mask, 0)) ) > + BUG(); > + > + cpumask_clear(per_cpu(cpu_sibling_mask, 0)); > + cpumask_clear(per_cpu(cpu_core_mask, 0)); > + > printk("Brought up %ld CPUs\n", (long)num_online_cpus()); > /* TODO: smp_cpus_done(); */ > > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c > index ea05afc..8517d86 100644 > --- a/xen/arch/arm/smpboot.c > +++ b/xen/arch/arm/smpboot.c > @@ -52,6 +52,11 @@ unsigned long __initdata ready_cpus = 0; > > /* ID of the PCPU we're running on */ > DEFINE_PER_CPU(unsigned int, cpu_id); > +/* XXX these seem awefully x86ish... */ > +/* representing HT siblings of each logical CPU */ > +DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_mask); > +/* representing HT and core siblings of each logical CPU */ > +DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask); > > void __init > smp_prepare_cpus (unsigned int max_cpus) > -- > 1.7.9.1 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >