u-boot/arch/arm
Andre Przywara 5ff4857d35 armv8: Fix and simplify branch_if_master/branch_if_slave
The branch_if_master macro jumps to a label if the CPU is the "master"
core, which we define as having all affinity levels set to 0. To check
for this condition, we need to mask off some bits from the MPIDR
register, then compare the remaining register value against zero.

The implementation of this was slighly broken (it preserved the upper
RES0 bits), overly complicated and hard to understand, especially since
it lacked comments. The same was true for the very similar
branch_if_slave macro.

Use a much shorter assembly sequence for those checks, use the same
masking for both macros (just negate the final branch), and put some
comments on them, to make it clear what the code does.
This allows to drop the second temporary register for branch_if_master,
so we adjust all call sites as well.

Also use the opportunity to remove a misleading comment: the macro
works fine on SoCs with multiple clusters. Judging by the commit
message, the original problem with the Juno SoC stems from the fact that
the master CPU *can* be configured to be from cluster 1, so the
assumption that the master CPU has all affinity values set to 0 does not
hold there. But this is already mentioned above in a comment, so remove
the extra comment.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-02 13:59:29 -05:00
..
cpu armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
dts Merge branch '2022-02-21-platform-updates' 2022-02-21 08:53:24 -05:00
include armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
lib efi_loader: fix SectionAlignment, FileAlignment 2022-01-15 10:57:22 +01:00
mach-apple arm: apple: Switch to fully dynamic mem layout 2022-02-28 10:33:45 -05:00
mach-aspeed ast2600: spl: Locate load buffer in DRAM space 2021-11-17 17:05:00 -05:00
mach-at91 Convert CONFIG_AT91_EFLASH to Kconfig 2022-01-21 14:01:35 -05:00
mach-bcm283x doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-bcmstb
mach-cortina
mach-davinci Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
mach-exynos Pull request doc-2022-04-rc1 2022-01-20 09:39:45 -05:00
mach-highbank
mach-imx imx8m: Drop unused function env_get_offset 2022-02-19 14:46:54 +01:00
mach-integrator
mach-ipq40xx
mach-k3 arm: j721e: Add support for selecting DT based on board name 2022-02-16 14:19:30 -05:00
mach-keystone arch/arm/mach-keystone/ddr3.c: Fix spelling of "resetting". 2022-01-13 07:57:50 -05:00
mach-kirkwood Convert CONFIG_SYS_IDE_MAXBUS et al to Kconfig 2022-02-09 09:16:47 -05:00
mach-lpc32xx
mach-mediatek arm: mediatek: merge board Kconfigs into mach-mediatek 2021-09-23 14:15:32 -04:00
mach-meson ARM: amlogic: add sm efuse write support and cmd for read/write efuse 2021-10-29 14:06:45 +02:00
mach-mvebu arm: mvebu: spl: Add option to reset the board on DDR training failure 2022-02-17 14:17:07 +01:00
mach-nexell Convert CONFIG_CONS_INDEX et al to Kconfig 2021-12-27 08:41:38 -05:00
mach-octeontx Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-octeontx2 Convert CONFIG_SYS_PCI_64BIT to Kconfig 2021-12-27 16:20:17 -05:00
mach-omap2 arm: omap3: Make some memory functions static and clean headers 2022-02-21 08:35:40 -05:00
mach-orion5x Convert CONFIG_88F5182 et al to Kconfig 2021-12-27 16:20:19 -05:00
mach-owl
mach-qemu
mach-rmobile armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
mach-rockchip - disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs 2022-01-09 07:56:31 -05:00
mach-s5pc1xx doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mach-snapdragon board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board 2021-10-31 11:25:38 -04:00
mach-socfpga armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
mach-sti
mach-stm32
mach-stm32mp configs: stm32mp15: Enable OF_BOARD flag 2022-01-24 11:03:21 +01:00
mach-sunxi mach-sunxi: Add support for SUNIV architecture 2022-02-04 00:09:57 +00:00
mach-tegra Merge https://source.denx.de/u-boot/custodians/u-boot-marvell 2022-01-20 12:40:20 -05:00
mach-u8500
mach-uniphier
mach-versal xilinx: Remove GPIO_EXTRA_HEADER selection 2022-02-15 13:06:13 +01:00
mach-versatile WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
mach-zynq ARM: zynq: Fix debug uart initialization 2022-02-21 13:20:24 +01:00
mach-zynqmp arm64: zynqmp: Fix debug uart initialization 2022-02-21 13:20:29 +01:00
mach-zynqmp-r5 Convert CONFIG_CPU_FREQ_HZ to Kconfig 2021-12-27 16:20:19 -05:00
thumb1/include/asm/proc-armv
config.mk
Kconfig Xilinx changes for v2022.04-rc3 2022-02-21 08:32:02 -05:00
Kconfig.debug
Makefile arm: apple: Add initial support for Apple's M1 SoC 2021-10-31 08:46:44 -04:00