]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
ARMv8: make master CPU checking logic more clear
authorzijun_hu <zijun_hu@htc.com>
Mon, 25 Sep 2017 07:28:50 +0000 (15:28 +0800)
committerTom Rini <trini@konsulko.com>
Sun, 8 Oct 2017 20:19:56 +0000 (16:19 -0400)
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>
arch/arm/include/asm/macro.h

index e1916f7705d1c4a8ef830520b084356b83bd08ec..0c8652a675fa98ba399a98cfc7489c992ae33ef4 100644 (file)
@@ -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