Thread (13 messages) 13 messages, 3 authors, 2023-08-23

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

From: Stephen Boyd <hidden>
Date: 2023-08-22 23:39:57
Also in: linux-perf-users, lkml

Quoting Douglas Anderson (2023-08-22 14:26:59)
quoted hunk ↗ jump to hunk
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
  */
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help