aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_event.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 6bfb2faa0b19..42adf012145d 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -817,6 +817,17 @@ do { \
817} while (0) 817} while (0)
818 818
819 819
820struct perf_pmu_events_attr {
821 struct device_attribute attr;
822 u64 id;
823};
824
825#define PMU_EVENT_ATTR(_name, _var, _id, _show) \
826static struct perf_pmu_events_attr _var = { \
827 .attr = __ATTR(_name, 0444, _show, NULL), \
828 .id = _id, \
829};
830
820#define PMU_FORMAT_ATTR(_name, _format) \ 831#define PMU_FORMAT_ATTR(_name, _format) \
821static ssize_t \ 832static ssize_t \
822_name##_show(struct device *dev, \ 833_name##_show(struct device *dev, \