aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-09-26 12:09:40 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-09-26 15:44:58 +0100
commitff9b41bb347b08114dd89cdc8e45bfc1d1b12511 (patch)
tree54b381b51d24a8303c3b129542816e5f75ffb1e2 /xen/include
parenta22a8e48eee4d1157eeef2b9c1b81ef9124dda4e (diff)
downloadxen-ff9b41bb347b08114dd89cdc8e45bfc1d1b12511.tar.gz
xen-ff9b41bb347b08114dd89cdc8e45bfc1d1b12511.tar.bz2
xen-ff9b41bb347b08114dd89cdc8e45bfc1d1b12511.zip
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 <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/include')
-rw-r--r--xen/include/asm-arm/processor.h4
1 files changed, 4 insertions, 0 deletions
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 {