Commit 60fa754b authored by Leo Yan's avatar Leo Yan Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarLeo 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.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 65c45afb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ FEATURE_TESTS_BASIC := \
        dwarf_getlocations              \
        eventfd                         \
        fortify-source                  \
        sync-compare-and-swap           \
        get_current_dir_name            \
        gettid				\
        glibc                           \
+0 −4
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ FILES= \
         test-dwarf_getlocations.bin            \
         test-eventfd.bin                       \
         test-fortify-source.bin                \
         test-sync-compare-and-swap.bin         \
         test-get_current_dir_name.bin          \
         test-glibc.bin                         \
         test-gtk2.bin                          \
@@ -260,9 +259,6 @@ $(OUTPUT)test-libdw-dwarf-unwind.bin:
$(OUTPUT)test-libbabeltrace.bin:
	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)

$(OUTPUT)test-sync-compare-and-swap.bin:
	$(BUILD)

$(OUTPUT)test-compile-32.bin:
	$(CC) -m32 -o $@ test-compile.c

+0 −4
Original line number Diff line number Diff line
@@ -106,10 +106,6 @@
# include "test-libdw-dwarf-unwind.c"
#undef main

#define main main_test_sync_compare_and_swap
# include "test-sync-compare-and-swap.c"
#undef main

#define main main_test_zlib
# include "test-zlib.c"
#undef main
+0 −15
Original line number Diff line number Diff line
// 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;
}