diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/perf_event.h | 11 |
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 | ||
| 820 | struct perf_pmu_events_attr { | ||
| 821 | struct device_attribute attr; | ||
| 822 | u64 id; | ||
| 823 | }; | ||
| 824 | |||
| 825 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ | ||
| 826 | static 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) \ |
| 821 | static ssize_t \ | 832 | static ssize_t \ |
| 822 | _name##_show(struct device *dev, \ | 833 | _name##_show(struct device *dev, \ |
