[PATCH v3 2/2] arm64: implement raw_smp_processor_id() using thread_info

Stephen Boyd swboyd at chromium.org
Wed May 8 14:13:26 PDT 2024


Quoting Puranjay Mohan (2024-05-03 10:18:47)
> Remove the percpu variable cpu_number as it is used only in
> set_smp_ipi_range() as a dummy variable to be passed to ipi_handler().
> Use irq_stat in place of cpu_number here like arm32.
>
> [1] https://github.com/puranjaymohan/linux/commit/77d3fdd

Maybe you should have put this under the cut for the patch so its on
the mailing list, and lore.

>
> Signed-off-by: Puranjay Mohan <puranjay at kernel.org>
> Acked-by: Mark Rutland <mark.rutland at arm.com>
> ---

Reviewed-by: Stephen Boyd <swboyd at chromium.org>

> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 4ced34f62dab..98d4e352c3d0 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -1021,12 +1016,12 @@ void __init set_smp_ipi_range(int ipi_base, int n)
>
>                 if (ipi_should_be_nmi(i)) {
>                         err = request_percpu_nmi(ipi_base + i, ipi_handler,
> -                                                "IPI", &cpu_number);
> +                                                "IPI", &irq_stat);

I know this is mirroring arm, but it would be nice to have a comment
saying that we need some percpu variable here even if the handler
doesn't use it.



More information about the linux-arm-kernel mailing list