aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/include/asm
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2025-10-07 17:08:16 +0200
committerHelge Deller <deller@gmx.de>2025-10-07 19:35:51 +0200
commit610cb23bcc75bcd9fead3e41cbd867cccd0eb229 (patch)
tree780ea3ac30fe1d3172ddf89a7abf4b732c634cf9 /arch/parisc/include/asm
parentparisc: Report software alignment faults via perf (diff)
downloadlinux-610cb23bcc75bcd9fead3e41cbd867cccd0eb229.tar.gz
linux-610cb23bcc75bcd9fead3e41cbd867cccd0eb229.zip
parisc: Add initial kernel-side perf_event support
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/include/asm')
-rw-r--r--arch/parisc/include/asm/perf_event.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/parisc/include/asm/perf_event.h b/arch/parisc/include/asm/perf_event.h
index 1e0fd8ba6c03..8a2925029d15 100644
--- a/arch/parisc/include/asm/perf_event.h
+++ b/arch/parisc/include/asm/perf_event.h
@@ -1,6 +1,12 @@
#ifndef __ASM_PARISC_PERF_EVENT_H
#define __ASM_PARISC_PERF_EVENT_H
-/* Empty, just to avoid compiling error */
+#include <asm/psw.h>
+
+#define perf_arch_fetch_caller_regs(regs, __ip) { \
+ (regs)->gr[0] = KERNEL_PSW; \
+ (regs)->iaoq[0] = (__ip); \
+ asm volatile("copy %%sp, %0\n":"=r"((regs)->gr[30])); \
+}
#endif /* __ASM_PARISC_PERF_EVENT_H */