From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [PATCH kvm-unit-tests 5/5] arm/arm64: support 64-bit MPIDRs Date: Wed, 14 Dec 2016 15:39:54 +0100 Message-ID: <20161214143954.10452-6-drjones@redhat.com> References: <20161214143954.10452-1-drjones@redhat.com> Cc: andre.przywara@arm.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58678 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752976AbcLNOkd (ORCPT ); Wed, 14 Dec 2016 09:40:33 -0500 In-Reply-To: <20161214143954.10452-1-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Reported-by: Andre Przywara Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 2 +- lib/arm/asm/setup.h | 2 +- lib/arm64/asm/processor.h | 2 +- lib/arm/setup.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index 6dc1472468dd..a8c4628da818 100644 --- a/lib/arm/asm/processor.h +++ b/lib/arm/asm/processor.h @@ -46,7 +46,7 @@ static inline void local_irq_disable(void) } #define MPIDR __ACCESS_CP15(c0, 0, c0, 5) -static inline unsigned int get_mpidr(void) +static inline uint64_t get_mpidr(void) { return read_sysreg(MPIDR); } diff --git a/lib/arm/asm/setup.h b/lib/arm/asm/setup.h index 1de99dd184d1..b0d51f5f0721 100644 --- a/lib/arm/asm/setup.h +++ b/lib/arm/asm/setup.h @@ -11,7 +11,7 @@ #include #define NR_CPUS 255 -extern u32 cpus[NR_CPUS]; /* per-cpu IDs (MPIDRs) */ +extern u64 cpus[NR_CPUS]; /* per-cpu IDs (MPIDRs) */ extern int nr_cpus; #define NR_MEM_REGIONS 8 diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h index f42f15c79d43..1d9223f728a5 100644 --- a/lib/arm64/asm/processor.h +++ b/lib/arm64/asm/processor.h @@ -78,7 +78,7 @@ static inline void local_irq_disable(void) asm volatile("msr daifset, #2" : : : "memory"); } -static inline unsigned int get_mpidr(void) +static inline uint64_t get_mpidr(void) { return read_sysreg(mpidr_el1); } diff --git a/lib/arm/setup.c b/lib/arm/setup.c index ac3fadb07828..68eae91286d6 100644 --- a/lib/arm/setup.c +++ b/lib/arm/setup.c @@ -24,7 +24,7 @@ extern unsigned long stacktop; extern void io_init(void); extern void setup_args_progname(const char *args); -u32 cpus[NR_CPUS] = { [0 ... NR_CPUS-1] = (~0U) }; +u64 cpus[NR_CPUS] = { [0 ... NR_CPUS-1] = (u64)~0 }; int nr_cpus; struct mem_region mem_regions[NR_MEM_REGIONS]; -- 2.9.3