aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/smp_plat.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-01-20 12:01:12 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-23 10:20:05 +0000
commiteb50439b92b6298bf209a982f295ba9c0f7cb30b (patch)
tree8678f4221e4a40907d9781753a8b95c96bbfded6 /arch/arm/include/asm/smp_plat.h
parentARM: 7291/1: cache: assume 64-byte L1 cachelines for ARMv7 CPUs (diff)
downloadlinux-dev-eb50439b92b6298bf209a982f295ba9c0f7cb30b.tar.xz
linux-dev-eb50439b92b6298bf209a982f295ba9c0f7cb30b.zip
ARM: 7293/1: logical_cpu_map: decouple CPU mapping from SMP
It turns out that the logical CPU mapping is useful even when !CONFIG_SMP for manipulation of devices like interrupt and power controllers when running a UP kernel on a CPU other than 0. This can happen when kexecing a UP image from an SMP kernel. In the future, multi-cluster systems running AMP configurations will require something similar for mapping cluster IDs, so it makes sense to decouple this logic in preparation for this support. Acked-by: Yang Bai <hamo.by@gmail.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Reported-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/smp_plat.h')
-rw-r--r--arch/arm/include/asm/smp_plat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h
index f24c1b9e211d..558d6c80aca9 100644
--- a/arch/arm/include/asm/smp_plat.h
+++ b/arch/arm/include/asm/smp_plat.h
@@ -43,4 +43,10 @@ static inline int cache_ops_need_broadcast(void)
}
#endif
+/*
+ * Logical CPU mapping.
+ */
+extern int __cpu_logical_map[];
+#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
+
#endif