Skip to contentSkip to conversation

ARMv8: make master CPU checking logic more clear

PATCH New zijun_hu 2 participants 2 messages Sep 25, 2017 – Oct 9, 2017 Arm (32-bit)

lore
Share & tools
lore

zijun_hu

author
#0 lore raw

PATCH 1/1 ARMv8: make master CPU checking logic more clear

From: zijun_hu <[email protected]>

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.

---
 arch/arm/include/asm/macro.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm/include/asm/macro.h +1 -0
index e1916f7..0c8652a 100644
@@ -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
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARMv8: make master CPU checking logic more clear

Quoted 8 lines · zijun_hu

From: zijun_hu <[email protected]>

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/61cf69d7/attachment.sig>