[PATCH kvm-unit-tests 5/5] arm/arm64: support 64-bit MPIDRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reported-by: Andre Przywara <andre.przywara@xxxxxxx>
Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
---
 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 <asm/pgtable-hwdef.h>
 
 #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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux