diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-07-14 08:32:41 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-15 10:57:28 -0400 |
commit | a7fde09a78a8ae40b81cfb5096c3cefef6c078c9 (patch) | |
tree | bd4578b2feb7777b33d317a4450f6b0ea99d3665 /tools/perf | |
parent | 65ea03e31e5ab47f784b1a701419264af97d3205 (diff) |
perf auxtrace: Fix misplaced check for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
Move the checking for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT for AUX area mmaps
until after checking if such mmaps are used anyway.
Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/55A5023C.7020907@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/auxtrace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 7e7405c9b936..83d9dd96fe08 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c | |||
@@ -53,11 +53,6 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, | |||
53 | { | 53 | { |
54 | struct perf_event_mmap_page *pc = userpg; | 54 | struct perf_event_mmap_page *pc = userpg; |
55 | 55 | ||
56 | #if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT) | ||
57 | pr_err("Cannot use AUX area tracing mmaps\n"); | ||
58 | return -1; | ||
59 | #endif | ||
60 | |||
61 | WARN_ONCE(mm->base, "Uninitialized auxtrace_mmap\n"); | 56 | WARN_ONCE(mm->base, "Uninitialized auxtrace_mmap\n"); |
62 | 57 | ||
63 | mm->userpg = userpg; | 58 | mm->userpg = userpg; |
@@ -73,6 +68,11 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, | |||
73 | return 0; | 68 | return 0; |
74 | } | 69 | } |
75 | 70 | ||
71 | #if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT) | ||
72 | pr_err("Cannot use AUX area tracing mmaps\n"); | ||
73 | return -1; | ||
74 | #endif | ||
75 | |||
76 | pc->aux_offset = mp->offset; | 76 | pc->aux_offset = mp->offset; |
77 | pc->aux_size = mp->len; | 77 | pc->aux_size = mp->len; |
78 | 78 | ||