From: Ian Campbell Subject: Re: [PATCH 1/7] xen/arm: Introduce MPIDR_HWID_MASK Date: Mon, 9 Sep 2013 14:09:42 +0100 Message-ID: <1378732182.19967.125.camel@kazak.uk.xensource.com> References: <1377869433-15385-1-git-send-email-julien.grall@linaro.org> <1377869433-15385-2-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377869433-15385-2-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: stefano.stabellini@eu.citrix.com, patches@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2013-08-30 at 14:30 +0100, Julien Grall wrote: > This define will be use later to retrieve the correct hardware CPU ID. > Also replace hardcoded mask in arm32/head.S by this define. > > Signed-off-by: Julien Grall Acked-by: Ian Campbell > --- > xen/arch/arm/arm32/head.S | 2 +- > xen/include/asm-arm/processor.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S > index b8334e2..79e95b6 100644 > --- a/xen/arch/arm/arm32/head.S > +++ b/xen/arch/arm/arm32/head.S > @@ -98,7 +98,7 @@ past_zImage: > beq boot_cpu > tst r0, #(1<<30) /* Uniprocessor system? */ > bne boot_cpu > - bics r12, r0, #(0xff << 24) /* Mask out flags to get CPU ID */ > + bics r12, r0, #(~MPIDR_HWID_MASK) /* Mask out flags to get CPU ID */ > beq boot_cpu /* If we're CPU 0, boot now */ > > /* Non-boot CPUs wait here to be woken up one at a time. */ > diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h > index 12795f3..b884354 100644 > --- a/xen/include/asm-arm/processor.h > +++ b/xen/include/asm-arm/processor.h > @@ -12,6 +12,7 @@ > #define MPIDR_SMP (1 << 31) > #define MPIDR_AFF0_SHIFT (0) > #define MPIDR_AFF0_MASK (0xff << MPIDR_AFF0_SHIFT) > +#define MPIDR_HWID_MASK 0xffffff > > /* TTBCR Translation Table Base Control Register */ > #define TTBCR_EAE 0x80000000