zephyr/arch
Sudan Landge 8bdd45be47 arch: arm: cortex_a_r: smp: minor fix for non cache coherent cores
What is changed?
1. Updated the data sync barrier to make sure the other parameters of
   `arm_cpu_boot_params` are updated before updating its member `mpidr`
2. Updated the MPIDR affinity level mask to account for affinity level
   1 and 2 along with level 0.

Why do we need this change?
1. As reported in issue #76182, on Cortex_A_R, the current code
   execution fails to consider the correct sequence of data sync
   barrier and cache maintenece for the code to work on non cache
   coherent cores in SMP enabled mode.
   The secondary cores are waiting in a loop for primary core to set
   `arm_cpu_boot_params.mpidr`. As soon as primary core set this,
    the secondary cores start reading other parameters from the
   `arm_cpu_boot_params` however, the existing position of DSB
   instruction doesn't guarantee that `arg`, `cpu_num` and other
   parameters of `arm_cpu_boot_params` would be updated before `mpidr`
   is udpated and this could lead to a unpredicatble behaviour so,
   we need to move the DSB instruction.
2. The affinity level mask is updated because it didn't account for
   level 1 to identify individual cores within a cluster and
   level 2 to identify different clusters within the system which can
   lead to an incorrect conversion between mpidr to core-id.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
..
arc arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
arm arch: arm: cortex_a_r: smp: minor fix for non cache coherent cores 2024-10-11 13:17:25 -04:00
arm64 arch: arm64: init xen in arch_kernel_init() 2024-09-17 20:05:22 -04:00
common Revert "arch: common: Add user can specify the nocache location" 2024-10-04 22:52:31 +01:00
mips arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
nios2 arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
posix arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
riscv arch: riscv: smp: prevent nested #ifdef 2024-10-04 10:50:14 +01:00
sparc arch: initialize irq_offload during boot, do not use SYS_INIT 2024-09-17 20:05:22 -04:00
x86 arch: x86_64: re-enable -mno-red-zone 2024-09-24 10:11:15 +02:00
xtensa xtensa: fix typo userpsace to userspace 2024-10-08 18:10:03 -04:00
CMakeLists.txt cmake: enable -Wshadow partially for in-tree code 2023-08-22 11:39:58 +02:00
Kconfig x86: add support for on-demand mappings 2024-09-23 18:10:38 -04:00
Kconfig.v1 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.v2 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
archs.yml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00