hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/powerpc/include/asm/perf_event.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Performance event support - hardware-specific disambiguation
34 *
....@@ -7,15 +8,12 @@
78 * devices other than the core which provide their own performance counters.
89 *
910 * Copyright 2010 Freescale Semiconductor, Inc.
10
- *
11
- * This program is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public License
13
- * as published by the Free Software Foundation; either version
14
- * 2 of the License, or (at your option) any later version.
1511 */
1612
1713 #ifdef CONFIG_PPC_PERF_CTRS
1814 #include <asm/perf_event_server.h>
15
+#else
16
+static inline bool is_sier_available(void) { return false; }
1917 #endif
2018
2119 #ifdef CONFIG_FSL_EMB_PERF_EVENT
....@@ -26,6 +24,8 @@
2624 #include <asm/ptrace.h>
2725 #include <asm/reg.h>
2826
27
+#define perf_arch_bpf_user_pt_regs(regs) &regs->user_regs
28
+
2929 /*
3030 * Overload regs->result to specify whether we should use the MSR (result
3131 * is zero) or the SIAR (result is non zero).
....@@ -34,7 +34,13 @@
3434 do { \
3535 (regs)->result = 0; \
3636 (regs)->nip = __ip; \
37
- (regs)->gpr[1] = current_stack_pointer(); \
37
+ (regs)->gpr[1] = current_stack_frame(); \
3838 asm volatile("mfmsr %0" : "=r" ((regs)->msr)); \
3939 } while (0)
40
+
41
+/* To support perf_regs sier update */
42
+extern bool is_sier_available(void);
43
+/* To define perf extended regs mask value */
44
+extern u64 PERF_REG_EXTENDED_MASK;
45
+#define PERF_REG_EXTENDED_MASK PERF_REG_EXTENDED_MASK
4046 #endif