[PATCH v10 4/6] arm64: smp: Add arch support for backtrace using pseudo-NMI

Stephen Boyd swboyd at chromium.org
Tue Aug 22 16:39:51 PDT 2023


Quoting Douglas Anderson (2023-08-22 14:26:59)
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index bfe60adbc453..15b66dc1391b 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -845,6 +852,22 @@ static void __noreturn ipi_cpu_crash_stop(unsigned int cpu, struct pt_regs *regs
>  #endif
>  }
>
> +void arm64_backtrace_ipi(cpumask_t *mask)
> +{
> +       __ipi_send_mask(ipi_desc[IPI_CPU_BACKTRACE], mask);
> +}
> +
> +void arch_trigger_cpumask_backtrace(const cpumask_t *mask, int exclude_cpu)
> +{
> +       /*
> +        * NOTE: though nmi_trigger_cpumask_backtrace has "nmi_" in the name,
> +        * nothing about it truly needs to be backed by an NMI, it's just that
> +        * it's _allowed_ to work with NMIs. If ipi_should_be_nmi() returned
> +        * false our backtrace attempt will just be backed by a regular IPI.

I think "backed by" is an idiom and may be confusing. Simplify by
replacing "backed by" with "implemented using"?

> +        */
> +       nmi_trigger_cpumask_backtrace(mask, exclude_cpu, arm64_backtrace_ipi);
> +}
> +
>  /*
>   * Main handler for inter-processor interrupts
>   */



More information about the linux-arm-kernel mailing list