Re: [PATCH] ARM: shmobile: smp: Enforce shmobile_smp_* alignment
From: Lad, Prabhakar
Date: Tue Mar 11 2025 - 11:14:10 EST
Hi Geert,
Thank you for the patch.
On Mon, Mar 10, 2025 at 1:14 PM Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:
>
> When the addresses of the shmobile_smp_mpidr, shmobile_smp_fn, and
> shmobile_smp_arg variables are not multiples of 4 bytes, secondary CPU
> bring-up fails:
>
> smp: Bringing up secondary CPUs ...
> CPU1: failed to come online
> CPU2: failed to come online
> CPU3: failed to come online
> smp: Brought up 1 node, 1 CPU
>
> Fix this by adding the missing alignment directive.
>
> Fixes: 4e960f52fce16a3b ("ARM: shmobile: Move shmobile_smp_{mpidr, fn, arg}[] from .text to .bss")
I wonder if this fixes tag should go back a bit far as I was able to
reproduce this on 5.10-cip BSP kernel on RZ/G1E this was only seen
when CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE was enabled,
RZ/G1E failure logs:
--------------------------
[ 0.006719] smp: Bringing up secondary CPUs ...
[ 1.040749] CPU1: failed to come online
[ 1.041014] smp: Brought up 1 node, 1 CPU
[ 1.041038] SMP: Total of 1 processors activated (65.00 BogoMIPS).
[ 1.041063] CPU: All CPU(s) started in SVC mode.
[ 1.041904] devtmpfs: initialized
[ 1.050811] VFP support v0.3: implementor 41 architecture 2 part 30
variant 7 rev 5
[ 1.051143] clocksource: jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 19112604462750000 ns
[ 1.051197] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 1.060510] pinctrl core: initialized pinctrl subsystem
[ 1.063139] NET: Registered protocol family 16
$ grep shmobile_smp_ System.map-notworking
c021caa0 t shmobile_smp_apmu_cpu_kill
c021cb20 t shmobile_smp_apmu_enter_suspend
c021cb54 t shmobile_smp_apmu_boot_secondary
c021cbc0 t shmobile_smp_apmu_cpu_shutdown
c021cc18 t shmobile_smp_apmu_do_suspend
c021cc60 t shmobile_smp_apmu_cpu_die
c021cc84 T shmobile_smp_hook
c021ccd8 T shmobile_smp_cpu_can_disable
c021d050 t shmobile_smp_continue_gen2
c021d0c4 T shmobile_smp_boot
c021d0e4 t shmobile_smp_boot_find_mpidr
c021d0fc t shmobile_smp_boot_next
c021d10c t shmobile_smp_boot_found
c021d114 T shmobile_smp_sleep
c021d380 T shmobile_smp_scu_cpu_die
c021d3b4 T shmobile_smp_scu_cpu_kill
c120a87c t shmobile_smp_apmu_prepare_cpus_dt
c120aab8 T shmobile_smp_apmu_suspend_init
c120aad0 T shmobile_smp_init_fallback_ops
c120b0f0 T shmobile_smp_scu_prepare_cpus
c1262778 t __cpu_method_of_table_shmobile_smp_apmu
c154d5fd B shmobile_smp_mpidr
c154d61d B shmobile_smp_fn
c154d63d B shmobile_smp_arg
> Closes: https://lore.kernel.org/r/CAMuHMdU=QR-JLgEHKWpsr6SbaZRc-Hz9r91JfpP8c3n2G-OjqA@xxxxxxxxxxxxxx
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> To be queued in renesas-fixes-for-v6.14.
> ---
> arch/arm/mach-shmobile/headsmp.S | 1 +
> 1 file changed, 1 insertion(+)
>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Cheers,
Prabhakar
> diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
> index a956b489b6ea12ca..2bc7e73a8582d2b3 100644
> --- a/arch/arm/mach-shmobile/headsmp.S
> +++ b/arch/arm/mach-shmobile/headsmp.S
> @@ -136,6 +136,7 @@ ENDPROC(shmobile_smp_sleep)
> .long shmobile_smp_arg - 1b
>
> .bss
> + .align 2
> .globl shmobile_smp_mpidr
> shmobile_smp_mpidr:
> .space NR_CPUS * 4
> --
> 2.43.0
>
>