aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-07-11 22:37:18 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-12 14:20:34 -0400
commit4998a1224686d74ab7f7789787f7f7f904c75dfc (patch)
tree8ac4250d8ef4945463c11f19e51ea57104fef2e8
parent4ffde492461d5c2111bf64366b633e554b4aa925 (diff)
tools: Copy uapi/linux/hw_breakpoint.h from the kernel
To allow the build to complete on older systems, where those files are either not uptodate, lacking some recent additions or not present at all. And check if the copy drifts from the kernel. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-3jz31pz4nw526uko5da9e7o3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/include/uapi/linux/hw_breakpoint.h30
-rw-r--r--tools/perf/MANIFEST3
-rw-r--r--tools/perf/Makefile.perf3
3 files changed, 34 insertions, 2 deletions
diff --git a/tools/include/uapi/linux/hw_breakpoint.h b/tools/include/uapi/linux/hw_breakpoint.h
new file mode 100644
index 000000000000..b04000a2296a
--- /dev/null
+++ b/tools/include/uapi/linux/hw_breakpoint.h
@@ -0,0 +1,30 @@
1#ifndef _UAPI_LINUX_HW_BREAKPOINT_H
2#define _UAPI_LINUX_HW_BREAKPOINT_H
3
4enum {
5 HW_BREAKPOINT_LEN_1 = 1,
6 HW_BREAKPOINT_LEN_2 = 2,
7 HW_BREAKPOINT_LEN_4 = 4,
8 HW_BREAKPOINT_LEN_8 = 8,
9};
10
11enum {
12 HW_BREAKPOINT_EMPTY = 0,
13 HW_BREAKPOINT_R = 1,
14 HW_BREAKPOINT_W = 2,
15 HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W,
16 HW_BREAKPOINT_X = 4,
17 HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
18};
19
20enum bp_type_idx {
21 TYPE_INST = 0,
22#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
23 TYPE_DATA = 0,
24#else
25 TYPE_DATA = 1,
26#endif
27 TYPE_MAX
28};
29
30#endif /* _UAPI_LINUX_HW_BREAKPOINT_H */
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index d15c052ccb7b..a4aefaeff355 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -61,6 +61,7 @@ tools/include/linux/list.h
61tools/include/linux/log2.h 61tools/include/linux/log2.h
62tools/include/uapi/linux/bpf.h 62tools/include/uapi/linux/bpf.h
63tools/include/uapi/linux/bpf_common.h 63tools/include/uapi/linux/bpf_common.h
64tools/include/uapi/linux/hw_breakpoint.h
64tools/include/uapi/linux/perf_event.h 65tools/include/uapi/linux/perf_event.h
65tools/include/linux/poison.h 66tools/include/linux/poison.h
66tools/include/linux/rbtree.h 67tools/include/linux/rbtree.h
@@ -82,10 +83,8 @@ arch/*/include/asm/unistd*.h
82arch/*/include/uapi/asm/unistd*.h 83arch/*/include/uapi/asm/unistd*.h
83tools/arch/*/include/uapi/asm/perf_regs.h 84tools/arch/*/include/uapi/asm/perf_regs.h
84include/linux/poison.h 85include/linux/poison.h
85include/linux/hw_breakpoint.h
86include/uapi/linux/const.h 86include/uapi/linux/const.h
87include/uapi/linux/swab.h 87include/uapi/linux/swab.h
88include/uapi/linux/hw_breakpoint.h
89arch/x86/include/asm/svm.h 88arch/x86/include/asm/svm.h
90arch/x86/include/asm/vmx.h 89arch/x86/include/asm/vmx.h
91arch/x86/include/asm/kvm_host.h 90arch/x86/include/asm/kvm_host.h
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 34b91ba8b425..0d07672c3af7 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -348,6 +348,9 @@ $(PERF_IN): prepare FORCE
348 @(test -f ../../include/uapi/linux/perf_event.h && ( \ 348 @(test -f ../../include/uapi/linux/perf_event.h && ( \
349 (diff -B ../include/uapi/linux/perf_event.h ../../include/uapi/linux/perf_event.h >/dev/null) \ 349 (diff -B ../include/uapi/linux/perf_event.h ../../include/uapi/linux/perf_event.h >/dev/null) \
350 || echo "Warning: tools/include/uapi/linux/perf_event.h differs from kernel" >&2 )) || true 350 || echo "Warning: tools/include/uapi/linux/perf_event.h differs from kernel" >&2 )) || true
351 @(test -f ../../include/uapi/linux/hw_breakpoint.h && ( \
352 (diff -B ../include/uapi/linux/hw_breakpoint.h ../../include/uapi/linux/hw_breakpoint.h >/dev/null) \
353 || echo "Warning: tools/include/uapi/linux/hw_breakpoint.h differs from kernel" >&2 )) || true
351 @(test -f ../../arch/x86/include/asm/disabled-features.h && ( \ 354 @(test -f ../../arch/x86/include/asm/disabled-features.h && ( \
352 (diff -B ../arch/x86/include/asm/disabled-features.h ../../arch/x86/include/asm/disabled-features.h >/dev/null) \ 355 (diff -B ../arch/x86/include/asm/disabled-features.h ../../arch/x86/include/asm/disabled-features.h >/dev/null) \
353 || echo "Warning: tools/arch/x86/include/asm/disabled-features.h differs from kernel" >&2 )) || true 356 || echo "Warning: tools/arch/x86/include/asm/disabled-features.h differs from kernel" >&2 )) || true