aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/perf_event.h7
-rw-r--r--kernel/events/core.c7
2 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index ca9ed4e6a286..ddbb6a901f65 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -403,13 +403,6 @@ struct perf_event_mmap_page {
403 __u64 data_tail; /* user-space written tail */ 403 __u64 data_tail; /* user-space written tail */
404}; 404};
405 405
406/*
407 * Build time assertion that we keep the data_head at the intended location.
408 * IOW, validation we got the __reserved[] size right.
409 */
410extern char __assert_mmap_data_head_offset
411 [1 - 2*!!(offsetof(struct perf_event_mmap_page, data_head) != 1024)];
412
413#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) 406#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0)
414#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) 407#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0)
415#define PERF_RECORD_MISC_KERNEL (1 << 0) 408#define PERF_RECORD_MISC_KERNEL (1 << 0)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index dc3b05272511..3f92a19aa11e 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7116,6 +7116,13 @@ void __init perf_event_init(void)
7116 7116
7117 /* do not patch jump label more than once per second */ 7117 /* do not patch jump label more than once per second */
7118 jump_label_rate_limit(&perf_sched_events, HZ); 7118 jump_label_rate_limit(&perf_sched_events, HZ);
7119
7120 /*
7121 * Build time assertion that we keep the data_head at the intended
7122 * location. IOW, validation we got the __reserved[] size right.
7123 */
7124 BUILD_BUG_ON((offsetof(struct perf_event_mmap_page, data_head))
7125 != 1024);
7119} 7126}
7120 7127
7121static int __init perf_event_sysfs_init(void) 7128static int __init perf_event_sysfs_init(void)