diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-29 18:29:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-29 18:29:23 -0700 |
commit | 88502b9c0a5dcc884c0dbfb6ddf964ff5da5d8d3 (patch) | |
tree | f79f728c308100bc3e57d0d2f5d1e00d90406a0d /kernel/events | |
parent | e18945b159a1cdbc031f1d3b0b7e515a33bdcbf7 (diff) | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) | |
download | blackbird-op-linux-88502b9c0a5dcc884c0dbfb6ddf964ff5da5d8d3.tar.gz blackbird-op-linux-88502b9c0a5dcc884c0dbfb6ddf964ff5da5d8d3.zip |
Merge 3.12-rc3 into driver-core-next
We want the driver core and sysfs fixes in here to make merges and
development easier.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 1a825a486a25..4ccb29bb761e 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -3660,6 +3660,26 @@ static void calc_timer_values(struct perf_event *event, *running = ctx_time - event->tstamp_running; } +static void perf_event_init_userpage(struct perf_event *event) +{ + struct perf_event_mmap_page *userpg; + struct ring_buffer *rb; + + rcu_read_lock(); + rb = rcu_dereference(event->rb); + if (!rb) + goto unlock; + + userpg = rb->user_page; + + /* Allow new userspace to detect that bit 0 is deprecated */ + userpg->cap_bit0_is_deprecated = 1; + userpg->size = offsetof(struct perf_event_mmap_page, __reserved); + +unlock: + rcu_read_unlock(); +} + void __weak arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) { } @@ -4044,6 +4064,7 @@ again: ring_buffer_attach(event, rb); rcu_assign_pointer(event->rb, rb); + perf_event_init_userpage(event); perf_event_update_userpage(event); unlock: |