summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorzijun_hu <zijun_hu@htc.com>2017-09-25 15:28:50 +0800
committerTom Rini <trini@konsulko.com>2017-10-08 16:19:56 -0400
commit34f9a9258397b5430adfedd2bf2c6517eb468d29 (patch)
tree0d2ff18a2a3052c2866c25f5d656237ff7eb46e5 /arch/arm/include
parentb813908354f91f83c79991e67b98897c4caf0c81 (diff)
ARMv8: make master CPU checking logic more clear
macro branch_if_master checks master CPU via (Aff3 & (Aff2:Aff1:Aff0)) it is simple but a little obscure. fix by checking Affx fields within MPIDR_EL1 directly. Signed-off-by: zijun_hu <zijun_hu@htc.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/macro.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/macro.h b/arch/arm/include/asm/macro.h
index e1916f7705..0c8652a675 100644
--- a/arch/arm/include/asm/macro.h
+++ b/arch/arm/include/asm/macro.h
@@ -131,6 +131,7 @@ lr .req x30
/* NOTE: MPIDR handling will be erroneous on multi-cluster machines */
mrs \xreg1, mpidr_el1
lsr \xreg2, \xreg1, #32
+ lsl \xreg2, \xreg2, #32
lsl \xreg1, \xreg1, #40
lsr \xreg1, \xreg1, #40
orr \xreg1, \xreg1, \xreg2