All of lore.kernel.org
 help / color / mirror / Atom feed
* perf getting all-zeroes IP on STM32MP1
@ 2026-09-04 13:26 Andrew MacPherson
  2026-09-04 14:08 ` Florian Bezdeka
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew MacPherson @ 2026-09-04 13:26 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

Hello,

We're working on an STM32MP1-based system running Xenomai and found
that perf top shows every symbol as "unknown [00000000]", i.e.
profiling is collecting samples, but they all point at address zero.

I'm not a kernel developer but went through a few debug kernel builds
with an agent which eventually led to the attached patch. This change
does resolve the issue with perf, however I'm not sure if it's the
correct solution.

The reasoning is that arm_arch_timer.c's percpu IRQ registration never
sets IRQF_TIMER, so Dovetail's copy_timer_regs() never populates
tick_regs, leaving get_irq_regs() to always return an all-zero
pt_regs, which in turn breaks perf's sample IP.

We're on kernel 6.6.48, i.e. an older revision of the (now-deprecated)
v6.6.y-evl-rebase branch, so entirely possible that this is fixed in a
later version, though the code appears to be the same.

Just wondering if anyone has any more insight around this and thanks
for any help!

Cheers,
Andrew

[-- Attachment #2: arm_arch_timer_flag.patch --]
[-- Type: application/octet-stream, Size: 1539 bytes --]

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 0000000000000..0000000000000 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1235,25 +1235,25 @@
 	ppi = arch_timer_ppi[arch_timer_uses_ppi];
 	switch (arch_timer_uses_ppi) {
 	case ARCH_TIMER_VIRT_PPI:
-		err = request_percpu_irq(ppi, arch_timer_handler_virt,
-					 "arch_timer", arch_timer_evt);
+		err = __request_percpu_irq(ppi, arch_timer_handler_virt,
+					 IRQF_TIMER, "arch_timer", arch_timer_evt);
 		break;
 	case ARCH_TIMER_PHYS_SECURE_PPI:
 	case ARCH_TIMER_PHYS_NONSECURE_PPI:
-		err = request_percpu_irq(ppi, arch_timer_handler_phys,
-					 "arch_timer", arch_timer_evt);
+		err = __request_percpu_irq(ppi, arch_timer_handler_phys,
+					 IRQF_TIMER, "arch_timer", arch_timer_evt);
 		if (!err && arch_timer_has_nonsecure_ppi()) {
 			ppi = arch_timer_ppi[ARCH_TIMER_PHYS_NONSECURE_PPI];
-			err = request_percpu_irq(ppi, arch_timer_handler_phys,
-						 "arch_timer", arch_timer_evt);
+			err = __request_percpu_irq(ppi, arch_timer_handler_phys,
+						 IRQF_TIMER, "arch_timer", arch_timer_evt);
 			if (err)
 				free_percpu_irq(arch_timer_ppi[ARCH_TIMER_PHYS_SECURE_PPI],
 						arch_timer_evt);
 		}
 		break;
 	case ARCH_TIMER_HYP_PPI:
-		err = request_percpu_irq(ppi, arch_timer_handler_phys,
-					 "arch_timer", arch_timer_evt);
+		err = __request_percpu_irq(ppi, arch_timer_handler_phys,
+					 IRQF_TIMER, "arch_timer", arch_timer_evt);
 		break;
 	default:
 		BUG();

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-09-09  8:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 13:26 perf getting all-zeroes IP on STM32MP1 Andrew MacPherson
2026-09-04 14:08 ` Florian Bezdeka
2026-09-04 15:17   ` Philippe Gerum
2026-09-04 15:55     ` Florian Bezdeka
2026-09-05  9:16       ` Philippe Gerum
2026-09-07  8:57   ` Andrew MacPherson
2026-09-07 11:34     ` Florian Bezdeka
2026-09-07 12:03       ` Gerte Hoogewerf
2026-09-07 12:41       ` Philippe Gerum
2026-09-07 14:39         ` Florian Bezdeka
2026-09-07 15:00           ` Philippe Gerum
2026-09-08  8:02             ` Florian Bezdeka
2026-09-08  8:16               ` Philippe Gerum
2026-09-08  8:46                 ` Florian Bezdeka
2026-09-09  8:21                   ` Philippe Gerum
2026-09-09  8:29                     ` Florian Bezdeka
2026-09-09  8:49                       ` Philippe Gerum
2026-09-08  8:11         ` Philippe Gerum
2026-09-07 12:51       ` Andrew MacPherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.