mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 10:37:01 +07:00
ARM: Introduce MPIDR_LEVEL_SHIFT macro
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>
This commit is contained in:
parent
d7d0a11e44
commit
163352eb68
@ -55,6 +55,7 @@
|
|||||||
|
|
||||||
#define MPIDR_LEVEL_BITS 8
|
#define MPIDR_LEVEL_BITS 8
|
||||||
#define MPIDR_LEVEL_MASK ((1 << MPIDR_LEVEL_BITS) - 1)
|
#define MPIDR_LEVEL_MASK ((1 << MPIDR_LEVEL_BITS) - 1)
|
||||||
|
#define MPIDR_LEVEL_SHIFT(level) (MPIDR_LEVEL_BITS * level)
|
||||||
|
|
||||||
#define MPIDR_AFFINITY_LEVEL(mpidr, level) \
|
#define MPIDR_AFFINITY_LEVEL(mpidr, level) \
|
||||||
((mpidr >> (MPIDR_LEVEL_BITS * level)) & MPIDR_LEVEL_MASK)
|
((mpidr >> (MPIDR_LEVEL_BITS * level)) & MPIDR_LEVEL_MASK)
|
||||||
|
Loading…
Reference in New Issue
Block a user