perf: Cleanup for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
[linux-2.6-microblaze.git] / tools / perf / util / auxtrace.c
index cb19669..f33f09b 100644 (file)
@@ -130,11 +130,6 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
                return 0;
        }
 
-#if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
-       pr_err("Cannot use AUX area tracing mmaps\n");
-       return -1;
-#endif
-
        pc->aux_offset = mp->offset;
        pc->aux_size = mp->len;
 
@@ -1686,14 +1681,11 @@ static int __auxtrace_mmap__read(struct mmap *map,
        union perf_event ev;
        void *data1, *data2;
 
-       if (snapshot) {
-               head = auxtrace_mmap__read_snapshot_head(mm);
-               if (auxtrace_record__find_snapshot(itr, mm->idx, mm, data,
-                                                  &head, &old))
-                       return -1;
-       } else {
-               head = auxtrace_mmap__read_head(mm);
-       }
+       head = auxtrace_mmap__read_head(mm);
+
+       if (snapshot &&
+           auxtrace_record__find_snapshot(itr, mm->idx, mm, data, &head, &old))
+               return -1;
 
        if (old == head)
                return 0;