u-boot/arch/arm/mach-rmobile
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
..
include/mach rcar: i2c: Migrate SYS_I2C_SH to Kconfig 2021-08-30 14:10:07 -04:00
board.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
cpu_info-r8a7740.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu_info-rcar.c arm: rmobile: Identify R8A7796 r1.3 SoC 2020-09-26 17:25:43 +02:00
cpu_info-rzg.c arm: mach-rmobile: Add CPU info support for RZ/G2 2021-04-13 23:36:25 +02:00
cpu_info-sh73a0.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu_info.c ARM: rmobile: Align CPU: print with other prints 2021-07-20 23:33:54 +02:00
emac.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
Kconfig serial: Rename SERIAL_SUPPORT to SERIAL 2021-09-04 12:26:01 -04:00
Kconfig.32 Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
Kconfig.64 ARM: rmobile: beacon: Enable reference clocks for USB and AVB 2021-10-29 21:52:20 +02:00
Kconfig.rza1 ARM: dts: renesas: Add RZ/A1 GR-Peach board 2019-05-07 05:41:32 +02:00
lowlevel_init_ca15.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lowlevel_init_gen3.S armv8: Fix and simplify branch_if_master/branch_if_slave 2022-03-02 13:59:29 -05:00
lowlevel_init.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile ARM: rmobile: Add basic PSCI support for R8A779A0 V3U Falcon 2021-06-24 20:22:18 +02:00
memmap-gen3.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pfc-r8a7740.c ARM: rmobile: Move SoC sources to mach-rmobile 2016-08-17 10:25:28 +09:00
pfc-r8a7790.h WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
pfc-sh73a0.c ARM: rmobile: Move SoC sources to mach-rmobile 2016-08-17 10:25:28 +09:00
psci-r8a779a0.c ARM: rmobile: Add basic PSCI support for R8A779A0 V3U Falcon 2021-06-24 20:22:18 +02:00
timer.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00