From ff9b41bb347b08114dd89cdc8e45bfc1d1b12511 Mon Sep 17 00:00:00 2001 From: Julien Grall Date: Thu, 26 Sep 2013 12:09:40 +0100 Subject: xen/arm: Dissociate logical and hardware CPU ID Introduce cpu_logical_map to associate a logical CPU ID to an hardware CPU ID. This map will be filled during Xen boot via the device tree. Each CPU node contains a "reg" property which contains the hardware ID (ie MPIDR[0:23]). Also move /cpus parsing later so we can use the dt_* API. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- xen/include/asm-arm/processor.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xen/include') diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index 808567e5df..06464227e3 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -13,6 +13,7 @@ #define MPIDR_AFF0_SHIFT (0) #define MPIDR_AFF0_MASK (0xff << MPIDR_AFF0_SHIFT) #define MPIDR_HWID_MASK 0xffffff +#define MPIDR_INVALID (~MPIDR_HWID_MASK) /* TTBCR Translation Table Base Control Register */ #define TTBCR_EAE 0x80000000 @@ -230,6 +231,9 @@ extern void identify_cpu(struct cpuinfo_arm *); extern struct cpuinfo_arm cpu_data[]; #define current_cpu_data cpu_data[smp_processor_id()] +extern u32 __cpu_logical_map[]; +#define cpu_logical_map(cpu) __cpu_logical_map[cpu] + union hsr { uint32_t bits; struct { -- cgit v1.2.3