aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/include/uapi/asm/bpf_perf_event.h7
-rw-r--r--tools/testing/selftests/bpf/Makefile13
2 files changed, 8 insertions, 12 deletions
diff --git a/tools/include/uapi/asm/bpf_perf_event.h b/tools/include/uapi/asm/bpf_perf_event.h
new file mode 100644
index 000000000000..13a58531e6fa
--- /dev/null
+++ b/tools/include/uapi/asm/bpf_perf_event.h
@@ -0,0 +1,7 @@
1#if defined(__aarch64__)
2#include "../../arch/arm64/include/uapi/asm/bpf_perf_event.h"
3#elif defined(__s390__)
4#include "../../arch/s390/include/uapi/asm/bpf_perf_event.h"
5#else
6#include <uapi/asm-generic/bpf_perf_event.h>
7#endif
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 21a2d76b67dc..792af7c3b74f 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,19 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2 2
3ifeq ($(srctree),)
4srctree := $(patsubst %/,%,$(dir $(CURDIR)))
5srctree := $(patsubst %/,%,$(dir $(srctree)))
6srctree := $(patsubst %/,%,$(dir $(srctree)))
7srctree := $(patsubst %/,%,$(dir $(srctree)))
8endif
9include $(srctree)/tools/scripts/Makefile.arch
10
11$(call detected_var,SRCARCH)
12
13LIBDIR := ../../../lib 3LIBDIR := ../../../lib
14BPFDIR := $(LIBDIR)/bpf 4BPFDIR := $(LIBDIR)/bpf
15APIDIR := ../../../include/uapi 5APIDIR := ../../../include/uapi
16ASMDIR:= ../../../arch/$(ARCH)/include/uapi
17GENDIR := ../../../../include/generated 6GENDIR := ../../../../include/generated
18GENHDR := $(GENDIR)/autoconf.h 7GENHDR := $(GENDIR)/autoconf.h
19 8
@@ -21,7 +10,7 @@ ifneq ($(wildcard $(GENHDR)),)
21 GENFLAGS := -DHAVE_GENHDR 10 GENFLAGS := -DHAVE_GENHDR
22endif 11endif
23 12
24CFLAGS += -Wall -O2 -I$(APIDIR) -I$(ASMDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include 13CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include
25LDLIBS += -lcap -lelf 14LDLIBS += -lcap -lelf
26 15
27TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \ 16TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \