提交 60fa754b 编写于 作者: L Leo Yan 提交者: Arnaldo Carvalho de Melo

tools: Remove feature-sync-compare-and-swap feature detection

Since the __sync functions have been removed from perf, it's needless
for perf tool to test the feature sync-compare-and-swap.

The feature test is not used by any other components, remove it.
Signed-off-by: NLeo Yan <leo.yan@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrii Nakryiko <andriin@fb.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Daniel Díaz <daniel.diaz@linaro.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: coresight@lists.linaro.org
Cc: x86@kernel.org
Link: http://lore.kernel.org/lkml/20210809111407.596077-10-leo.yan@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 65c45afb
...@@ -34,7 +34,6 @@ FEATURE_TESTS_BASIC := \ ...@@ -34,7 +34,6 @@ FEATURE_TESTS_BASIC := \
dwarf_getlocations \ dwarf_getlocations \
eventfd \ eventfd \
fortify-source \ fortify-source \
sync-compare-and-swap \
get_current_dir_name \ get_current_dir_name \
gettid \ gettid \
glibc \ glibc \
......
...@@ -9,7 +9,6 @@ FILES= \ ...@@ -9,7 +9,6 @@ FILES= \
test-dwarf_getlocations.bin \ test-dwarf_getlocations.bin \
test-eventfd.bin \ test-eventfd.bin \
test-fortify-source.bin \ test-fortify-source.bin \
test-sync-compare-and-swap.bin \
test-get_current_dir_name.bin \ test-get_current_dir_name.bin \
test-glibc.bin \ test-glibc.bin \
test-gtk2.bin \ test-gtk2.bin \
...@@ -260,9 +259,6 @@ $(OUTPUT)test-libdw-dwarf-unwind.bin: ...@@ -260,9 +259,6 @@ $(OUTPUT)test-libdw-dwarf-unwind.bin:
$(OUTPUT)test-libbabeltrace.bin: $(OUTPUT)test-libbabeltrace.bin:
$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
$(OUTPUT)test-sync-compare-and-swap.bin:
$(BUILD)
$(OUTPUT)test-compile-32.bin: $(OUTPUT)test-compile-32.bin:
$(CC) -m32 -o $@ test-compile.c $(CC) -m32 -o $@ test-compile.c
......
...@@ -106,10 +106,6 @@ ...@@ -106,10 +106,6 @@
# include "test-libdw-dwarf-unwind.c" # include "test-libdw-dwarf-unwind.c"
#undef main #undef main
#define main main_test_sync_compare_and_swap
# include "test-sync-compare-and-swap.c"
#undef main
#define main main_test_zlib #define main main_test_zlib
# include "test-zlib.c" # include "test-zlib.c"
#undef main #undef main
......
// SPDX-License-Identifier: GPL-2.0
#include <stdint.h>
volatile uint64_t x;
int main(int argc, char *argv[])
{
uint64_t old, new = argc;
(void)argv;
do {
old = __sync_val_compare_and_swap(&x, 0, 0);
} while (!__sync_bool_compare_and_swap(&x, old, new));
return old == new;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册