aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-10-29 02:20:52 -0400
committerIngo Molnar <mingo@kernel.org>2018-10-29 02:20:52 -0400
commitf0718d792b8a6d4b5ddc929e418ac57cc4897375 (patch)
tree3dbaa824ce380e99709fae47c047383ca39c983a /tools/perf
parentefe8eaf7b525f1be26fe20d723d2bfbfcd7455fd (diff)
parentb59dfdaef173677b0b7e10f375226c0a1114fd20 (diff)
Merge branch 'linus' into perf/urgent, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/arch/powerpc/util/book3s_hv_exits.h1
-rw-r--r--tools/perf/util/mmap.h15
2 files changed, 3 insertions, 13 deletions
diff --git a/tools/perf/arch/powerpc/util/book3s_hv_exits.h b/tools/perf/arch/powerpc/util/book3s_hv_exits.h
index 853b95d1e139..2011376c7ab5 100644
--- a/tools/perf/arch/powerpc/util/book3s_hv_exits.h
+++ b/tools/perf/arch/powerpc/util/book3s_hv_exits.h
@@ -15,7 +15,6 @@
15 {0x400, "INST_STORAGE"}, \ 15 {0x400, "INST_STORAGE"}, \
16 {0x480, "INST_SEGMENT"}, \ 16 {0x480, "INST_SEGMENT"}, \
17 {0x500, "EXTERNAL"}, \ 17 {0x500, "EXTERNAL"}, \
18 {0x501, "EXTERNAL_LEVEL"}, \
19 {0x502, "EXTERNAL_HV"}, \ 18 {0x502, "EXTERNAL_HV"}, \
20 {0x600, "ALIGNMENT"}, \ 19 {0x600, "ALIGNMENT"}, \
21 {0x700, "PROGRAM"}, \ 20 {0x700, "PROGRAM"}, \
diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
index e603314dc792..cc5e2d6d17a9 100644
--- a/tools/perf/util/mmap.h
+++ b/tools/perf/util/mmap.h
@@ -4,7 +4,7 @@
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5#include <linux/refcount.h> 5#include <linux/refcount.h>
6#include <linux/types.h> 6#include <linux/types.h>
7#include <asm/barrier.h> 7#include <linux/ring_buffer.h>
8#include <stdbool.h> 8#include <stdbool.h>
9#include "auxtrace.h" 9#include "auxtrace.h"
10#include "event.h" 10#include "event.h"
@@ -71,21 +71,12 @@ void perf_mmap__consume(struct perf_mmap *map);
71 71
72static inline u64 perf_mmap__read_head(struct perf_mmap *mm) 72static inline u64 perf_mmap__read_head(struct perf_mmap *mm)
73{ 73{
74 struct perf_event_mmap_page *pc = mm->base; 74 return ring_buffer_read_head(mm->base);
75 u64 head = READ_ONCE(pc->data_head);
76 rmb();
77 return head;
78} 75}
79 76
80static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail) 77static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail)
81{ 78{
82 struct perf_event_mmap_page *pc = md->base; 79 ring_buffer_write_tail(md->base, tail);
83
84 /*
85 * ensure all reads are done before we write the tail out.
86 */
87 mb();
88 pc->data_tail = tail;
89} 80}
90 81
91union perf_event *perf_mmap__read_forward(struct perf_mmap *map); 82union perf_event *perf_mmap__read_forward(struct perf_mmap *map);