diff options
-rw-r--r-- | Documentation/perf_counter/kerneltop.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c index fda1438365dc..2779c57ad4ba 100644 --- a/Documentation/perf_counter/kerneltop.c +++ b/Documentation/perf_counter/kerneltop.c | |||
@@ -1125,22 +1125,10 @@ struct mmap_data { | |||
1125 | static unsigned int mmap_read_head(struct mmap_data *md) | 1125 | static unsigned int mmap_read_head(struct mmap_data *md) |
1126 | { | 1126 | { |
1127 | struct perf_counter_mmap_page *pc = md->base; | 1127 | struct perf_counter_mmap_page *pc = md->base; |
1128 | unsigned int seq, head; | 1128 | int head; |
1129 | |||
1130 | repeat: | ||
1131 | rmb(); | ||
1132 | seq = pc->lock; | ||
1133 | |||
1134 | if (unlikely(seq & 1)) { | ||
1135 | cpu_relax(); | ||
1136 | goto repeat; | ||
1137 | } | ||
1138 | 1129 | ||
1139 | head = pc->data_head; | 1130 | head = pc->data_head; |
1140 | |||
1141 | rmb(); | 1131 | rmb(); |
1142 | if (pc->lock != seq) | ||
1143 | goto repeat; | ||
1144 | 1132 | ||
1145 | return head; | 1133 | return head; |
1146 | } | 1134 | } |