ARM: Introduce MPIDR_LEVEL_SHIFT macro
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 12 Sep 2016 14:49:21 +0000 (15:49 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 22 Sep 2016 11:22:05 +0000 (13:22 +0200)
vgic-v3 driver uses architecture specific MPIDR_LEVEL_SHIFT macro to
encode the affinity in a form compatible with ICC_SGI* registers.
Unfortunately, that macro is missing on ARM, so let's add it.

Cc: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/cputype.h

index 1ee94c716a7f87f45c00436fb9b2fa640014c811..e2d94c1b07b8ab8a01999a6dfb15b9ba93a5f657 100644 (file)
@@ -55,6 +55,7 @@
 
 #define MPIDR_LEVEL_BITS 8
 #define MPIDR_LEVEL_MASK ((1 << MPIDR_LEVEL_BITS) - 1)
+#define MPIDR_LEVEL_SHIFT(level) (MPIDR_LEVEL_BITS * level)
 
 #define MPIDR_AFFINITY_LEVEL(mpidr, level) \
        ((mpidr >> (MPIDR_LEVEL_BITS * level)) & MPIDR_LEVEL_MASK)