]>
Commit | Line | Data |
---|---|---|
aeafd623 | 1 | #!/bin/sh |
b2441318 | 2 | # SPDX-License-Identifier: GPL-2.0 |
aeafd623 | 3 | |
00a26390 | 4 | FILES=' |
aaa6ef8a | 5 | include/uapi/linux/const.h |
c1737f2b ACM |
6 | include/uapi/drm/drm.h |
7 | include/uapi/drm/i915_drm.h | |
f9cdd63e | 8 | include/uapi/linux/fadvise.h |
67ef2879 | 9 | include/uapi/linux/fcntl.h |
f443f38c | 10 | include/uapi/linux/fs.h |
0ae40612 | 11 | include/uapi/linux/fscrypt.h |
735e215e | 12 | include/uapi/linux/kcmp.h |
3ce97513 | 13 | include/uapi/linux/kvm.h |
a4b20612 | 14 | include/uapi/linux/in.h |
250bfc87 | 15 | include/uapi/linux/mount.h |
c4528333 | 16 | include/uapi/linux/openat2.h |
aeafd623 | 17 | include/uapi/linux/perf_event.h |
43372794 | 18 | include/uapi/linux/prctl.h |
450c86c9 | 19 | include/uapi/linux/sched.h |
67ef2879 | 20 | include/uapi/linux/stat.h |
2bd71d11 | 21 | include/uapi/linux/usbdevice_fs.h |
d02b395e | 22 | include/uapi/linux/vhost.h |
a215684e | 23 | include/uapi/sound/asound.h |
ba4aa02b | 24 | include/linux/bits.h |
e3698b23 | 25 | include/vdso/bits.h |
aaa6ef8a | 26 | include/linux/const.h |
ca64d84e | 27 | include/vdso/const.h |
aeafd623 JO |
28 | include/linux/hash.h |
29 | include/uapi/linux/hw_breakpoint.h | |
30 | arch/x86/include/asm/disabled-features.h | |
31 | arch/x86/include/asm/required-features.h | |
32 | arch/x86/include/asm/cpufeatures.h | |
00a26390 | 33 | arch/x86/include/asm/inat_types.h |
4d65adfc | 34 | arch/x86/include/asm/emulate_prefix.h |
d2b72b72 | 35 | arch/x86/include/asm/irq_vectors.h |
444e2ff3 | 36 | arch/x86/include/asm/msr-index.h |
c22e2683 | 37 | arch/x86/include/uapi/asm/prctl.h |
00a26390 JP |
38 | arch/x86/lib/x86-opcode-map.txt |
39 | arch/x86/tools/gen-insn-attr-x86.awk | |
aeafd623 JO |
40 | arch/arm/include/uapi/asm/perf_regs.h |
41 | arch/arm64/include/uapi/asm/perf_regs.h | |
6c1ced2f | 42 | arch/mips/include/uapi/asm/perf_regs.h |
aeafd623 | 43 | arch/powerpc/include/uapi/asm/perf_regs.h |
10b9baa7 | 44 | arch/s390/include/uapi/asm/perf_regs.h |
aeafd623 JO |
45 | arch/x86/include/uapi/asm/perf_regs.h |
46 | arch/x86/include/uapi/asm/kvm.h | |
47 | arch/x86/include/uapi/asm/kvm_perf.h | |
48 | arch/x86/include/uapi/asm/svm.h | |
047726d1 | 49 | arch/x86/include/uapi/asm/unistd.h |
aeafd623 JO |
50 | arch/x86/include/uapi/asm/vmx.h |
51 | arch/powerpc/include/uapi/asm/kvm.h | |
52 | arch/s390/include/uapi/asm/kvm.h | |
53 | arch/s390/include/uapi/asm/kvm_perf.h | |
a81c4213 | 54 | arch/s390/include/uapi/asm/ptrace.h |
aeafd623 JO |
55 | arch/s390/include/uapi/asm/sie.h |
56 | arch/arm/include/uapi/asm/kvm.h | |
57 | arch/arm64/include/uapi/asm/kvm.h | |
34b009cf | 58 | arch/arm64/include/uapi/asm/unistd.h |
95f28190 HB |
59 | arch/alpha/include/uapi/asm/errno.h |
60 | arch/mips/include/asm/errno.h | |
61 | arch/mips/include/uapi/asm/errno.h | |
62 | arch/parisc/include/uapi/asm/errno.h | |
63 | arch/powerpc/include/uapi/asm/errno.h | |
64 | arch/sparc/include/uapi/asm/errno.h | |
65 | arch/x86/include/uapi/asm/errno.h | |
aeafd623 JO |
66 | include/asm-generic/bitops/arch_hweight.h |
67 | include/asm-generic/bitops/const_hweight.h | |
68 | include/asm-generic/bitops/__fls.h | |
69 | include/asm-generic/bitops/fls.h | |
70 | include/asm-generic/bitops/fls64.h | |
71 | include/linux/coresight-pmu.h | |
28b8f954 HB |
72 | include/uapi/asm-generic/errno.h |
73 | include/uapi/asm-generic/errno-base.h | |
6375f0ab | 74 | include/uapi/asm-generic/ioctls.h |
aeafd623 | 75 | include/uapi/asm-generic/mman-common.h |
34b009cf | 76 | include/uapi/asm-generic/unistd.h |
aeafd623 JO |
77 | ' |
78 | ||
d30c7b82 BP |
79 | SYNC_CHECK_FILES=' |
80 | arch/x86/include/asm/inat.h | |
81 | arch/x86/include/asm/insn.h | |
82 | arch/x86/lib/inat.c | |
83 | arch/x86/lib/insn.c | |
84 | ' | |
85 | ||
d758d5d4 ACM |
86 | # These copies are under tools/perf/trace/beauty/ as they are not used to in |
87 | # building object files only by scripts in tools/perf/trace/beauty/ to generate | |
88 | # tables that then gets included in .c files for things like id->string syscall | |
89 | # tables (and the reverse lookup as well: string -> id) | |
90 | ||
91 | BEAUTY_FILES=' | |
92 | include/linux/socket.h | |
93 | ' | |
94 | ||
58247297 JO |
95 | check_2 () { |
96 | file1=$1 | |
97 | file2=$2 | |
aeafd623 | 98 | |
58247297 | 99 | shift |
aeafd623 | 100 | shift |
aeafd623 | 101 | |
58247297 | 102 | cmd="diff $* $file1 $file2 > /dev/null" |
aeafd623 | 103 | |
51d8aac2 AK |
104 | test -f $file2 && { |
105 | eval $cmd || { | |
7ea6e983 JO |
106 | echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2 |
107 | echo diff -u $file1 $file2 | |
51d8aac2 AK |
108 | } |
109 | } | |
aeafd623 JO |
110 | } |
111 | ||
58247297 JO |
112 | check () { |
113 | file=$1 | |
114 | ||
115 | shift | |
116 | ||
7ea6e983 | 117 | check_2 tools/$file $file $* |
58247297 | 118 | } |
aeafd623 | 119 | |
d758d5d4 ACM |
120 | beauty_check () { |
121 | file=$1 | |
122 | ||
123 | shift | |
124 | ||
125 | check_2 tools/perf/trace/beauty/$file $file $* | |
126 | } | |
127 | ||
d7e05cea ACM |
128 | # Check if we have the kernel headers (tools/perf/../../include), else |
129 | # we're probably on a detached tarball, so no point in trying to check | |
130 | # differences. | |
131 | test -d ../../include || exit 0 | |
132 | ||
7ea6e983 JO |
133 | cd ../.. |
134 | ||
aeafd623 | 135 | # simple diff check |
00a26390 | 136 | for i in $FILES; do |
aeafd623 JO |
137 | check $i -B |
138 | done | |
139 | ||
d30c7b82 BP |
140 | for i in $SYNC_CHECK_FILES; do |
141 | check $i '-I "^.*\/\*.*__ignore_sync_check__.*\*\/.*$"' | |
142 | done | |
143 | ||
aeafd623 | 144 | # diff with extra ignore lines |
bd5c6b81 ACM |
145 | check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))"' |
146 | check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memset_\(erms\|orig\))"' | |
be709d48 | 147 | check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"' |
15019e98 | 148 | check include/uapi/linux/mman.h '-I "^#include <\(uapi/\)*asm/mman.h>"' |
e3698b23 | 149 | check include/linux/build_bug.h '-I "^#\(ifndef\|endif\)\( \/\/\)* static_assert$"' |
3052ba56 ACM |
150 | check include/linux/ctype.h '-I "isdigit("' |
151 | check lib/ctype.c '-I "^EXPORT_SYMBOL" -I "^#include <linux/export.h>" -B' | |
7ea6e983 | 152 | |
c9b51a01 JO |
153 | # diff non-symmetric files |
154 | check_2 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl | |
9bad32b2 | 155 | check_2 tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl |
22ffc3f5 | 156 | check_2 tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl |
d9fd5a71 | 157 | check_2 tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl |
c9b51a01 | 158 | |
d758d5d4 ACM |
159 | for i in $BEAUTY_FILES; do |
160 | beauty_check $i -B | |
161 | done | |
f3cf7fa9 | 162 | |
eee19501 IR |
163 | # check duplicated library files |
164 | check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h | |
165 | check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c | |
166 | ||
7ea6e983 | 167 | cd tools/perf |