hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/s390/include/asm/perf_event.h
....@@ -12,7 +12,7 @@
1212
1313 #include <linux/perf_event.h>
1414 #include <linux/device.h>
15
-#include <asm/cpu_mf.h>
15
+#include <asm/stacktrace.h>
1616
1717 /* Per-CPU flags for PMU states */
1818 #define PMU_F_RESERVED 0x1000
....@@ -55,11 +55,13 @@
5555 #define PERF_CPUM_SF_MAX_CTR 2
5656 #define PERF_EVENT_CPUM_SF 0xB0000UL /* Event: Basic-sampling */
5757 #define PERF_EVENT_CPUM_SF_DIAG 0xBD000UL /* Event: Combined-sampling */
58
+#define PERF_EVENT_CPUM_CF_DIAG 0xBC000UL /* Event: Counter sets */
5859 #define PERF_CPUM_SF_BASIC_MODE 0x0001 /* Basic-sampling flag */
5960 #define PERF_CPUM_SF_DIAG_MODE 0x0002 /* Diagnostic-sampling flag */
6061 #define PERF_CPUM_SF_MODE_MASK (PERF_CPUM_SF_BASIC_MODE| \
6162 PERF_CPUM_SF_DIAG_MODE)
6263 #define PERF_CPUM_SF_FULL_BLOCKS 0x0004 /* Process full SDBs only */
64
+#define PERF_CPUM_SF_FREQ_MODE 0x0008 /* Sampling with frequency */
6365
6466 #define REG_NONE 0
6567 #define REG_OVERFLOW 1
....@@ -70,5 +72,12 @@
7072 #define SAMPL_FLAGS(hwc) ((hwc)->config_base)
7173 #define SAMPL_DIAG_MODE(hwc) (SAMPL_FLAGS(hwc) & PERF_CPUM_SF_DIAG_MODE)
7274 #define SDB_FULL_BLOCKS(hwc) (SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FULL_BLOCKS)
75
+#define SAMPLE_FREQ_MODE(hwc) (SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FREQ_MODE)
76
+
77
+#define perf_arch_fetch_caller_regs(regs, __ip) do { \
78
+ (regs)->psw.addr = (__ip); \
79
+ (regs)->gprs[15] = (unsigned long)__builtin_frame_address(0) - \
80
+ offsetof(struct stack_frame, back_chain); \
81
+} while (0)
7382
7483 #endif /* _ASM_S390_PERF_EVENT_H */