[PATCH] arm64: Update comment regarding values in __boot_cpu_mode

Dave Martin Dave.Martin at arm.com
Tue May 13 06:59:47 PDT 2025


Hi,

On Tue, May 13, 2025 at 01:45:25PM +0100, Ben Horgan wrote:
> The values stored in __boot_cpu_mode were changed without updating the
> comment. Rectify that.
> 
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>

FWIW,

Reviewed-by: Dave Martin <Dave.Martin at arm.com>

(I find the actual __boot_cpu_mode[] behaviour a bit of a puzzle, but
the updated comment looks good.)

Cheers
---Dave

> ---
> 
> The discrepancy was introduced in commit 828e9834e9a5 ("arm64: head:
> create a new function for setting the boot_cpu_mode flag").
> 
>  arch/arm64/include/asm/virt.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h
> index ebf4a9f943ed..aa280f356b96 100644
> --- a/arch/arm64/include/asm/virt.h
> +++ b/arch/arm64/include/asm/virt.h
> @@ -67,7 +67,8 @@
>   * __boot_cpu_mode records what mode CPUs were booted in.
>   * A correctly-implemented bootloader must start all CPUs in the same mode:
>   * In this case, both 32bit halves of __boot_cpu_mode will contain the
> - * same value (either 0 if booted in EL1, BOOT_CPU_MODE_EL2 if booted in EL2).
> + * same value (either BOOT_CPU_MODE_EL1 if booted in EL1, BOOT_CPU_MODE_EL2 if
> + * booted in EL2).
>   *
>   * Should the bootloader fail to do this, the two values will be different.
>   * This allows the kernel to flag an error when the secondaries have come up.
> -- 
> 2.43.0
> 
> 



More information about the linux-arm-kernel mailing list