]>
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 |
aeafd623 | 16 | include/uapi/linux/perf_event.h |
43372794 | 17 | include/uapi/linux/prctl.h |
450c86c9 | 18 | include/uapi/linux/sched.h |
67ef2879 | 19 | include/uapi/linux/stat.h |
2bd71d11 | 20 | include/uapi/linux/usbdevice_fs.h |
d02b395e | 21 | include/uapi/linux/vhost.h |
a215684e | 22 | include/uapi/sound/asound.h |
ba4aa02b | 23 | include/linux/bits.h |
aaa6ef8a | 24 | include/linux/const.h |
aeafd623 JO |
25 | include/linux/hash.h |
26 | include/uapi/linux/hw_breakpoint.h | |
27 | arch/x86/include/asm/disabled-features.h | |
28 | arch/x86/include/asm/required-features.h | |
29 | arch/x86/include/asm/cpufeatures.h | |
00a26390 | 30 | arch/x86/include/asm/inat_types.h |
c22e2683 | 31 | arch/x86/include/uapi/asm/prctl.h |
00a26390 JP |
32 | arch/x86/lib/x86-opcode-map.txt |
33 | arch/x86/tools/gen-insn-attr-x86.awk | |
aeafd623 JO |
34 | arch/arm/include/uapi/asm/perf_regs.h |
35 | arch/arm64/include/uapi/asm/perf_regs.h | |
36 | arch/powerpc/include/uapi/asm/perf_regs.h | |
10b9baa7 | 37 | arch/s390/include/uapi/asm/perf_regs.h |
aeafd623 JO |
38 | arch/x86/include/uapi/asm/perf_regs.h |
39 | arch/x86/include/uapi/asm/kvm.h | |
40 | arch/x86/include/uapi/asm/kvm_perf.h | |
41 | arch/x86/include/uapi/asm/svm.h | |
047726d1 | 42 | arch/x86/include/uapi/asm/unistd.h |
aeafd623 JO |
43 | arch/x86/include/uapi/asm/vmx.h |
44 | arch/powerpc/include/uapi/asm/kvm.h | |
45 | arch/s390/include/uapi/asm/kvm.h | |
46 | arch/s390/include/uapi/asm/kvm_perf.h | |
a81c4213 | 47 | arch/s390/include/uapi/asm/ptrace.h |
aeafd623 JO |
48 | arch/s390/include/uapi/asm/sie.h |
49 | arch/arm/include/uapi/asm/kvm.h | |
50 | arch/arm64/include/uapi/asm/kvm.h | |
34b009cf | 51 | arch/arm64/include/uapi/asm/unistd.h |
95f28190 HB |
52 | arch/alpha/include/uapi/asm/errno.h |
53 | arch/mips/include/asm/errno.h | |
54 | arch/mips/include/uapi/asm/errno.h | |
55 | arch/parisc/include/uapi/asm/errno.h | |
56 | arch/powerpc/include/uapi/asm/errno.h | |
57 | arch/sparc/include/uapi/asm/errno.h | |
58 | arch/x86/include/uapi/asm/errno.h | |
aeafd623 JO |
59 | include/asm-generic/bitops/arch_hweight.h |
60 | include/asm-generic/bitops/const_hweight.h | |
61 | include/asm-generic/bitops/__fls.h | |
62 | include/asm-generic/bitops/fls.h | |
63 | include/asm-generic/bitops/fls64.h | |
64 | include/linux/coresight-pmu.h | |
28b8f954 HB |
65 | include/uapi/asm-generic/errno.h |
66 | include/uapi/asm-generic/errno-base.h | |
6375f0ab | 67 | include/uapi/asm-generic/ioctls.h |
aeafd623 | 68 | include/uapi/asm-generic/mman-common.h |
34b009cf | 69 | include/uapi/asm-generic/unistd.h |
aeafd623 JO |
70 | ' |
71 | ||
58247297 JO |
72 | check_2 () { |
73 | file1=$1 | |
74 | file2=$2 | |
aeafd623 | 75 | |
58247297 | 76 | shift |
aeafd623 | 77 | shift |
aeafd623 | 78 | |
58247297 | 79 | cmd="diff $* $file1 $file2 > /dev/null" |
aeafd623 | 80 | |
51d8aac2 AK |
81 | test -f $file2 && { |
82 | eval $cmd || { | |
7ea6e983 JO |
83 | echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2 |
84 | echo diff -u $file1 $file2 | |
51d8aac2 AK |
85 | } |
86 | } | |
aeafd623 JO |
87 | } |
88 | ||
58247297 JO |
89 | check () { |
90 | file=$1 | |
91 | ||
92 | shift | |
93 | ||
7ea6e983 | 94 | check_2 tools/$file $file $* |
58247297 | 95 | } |
aeafd623 | 96 | |
d7e05cea ACM |
97 | # Check if we have the kernel headers (tools/perf/../../include), else |
98 | # we're probably on a detached tarball, so no point in trying to check | |
99 | # differences. | |
100 | test -d ../../include || exit 0 | |
101 | ||
7ea6e983 JO |
102 | cd ../.. |
103 | ||
aeafd623 | 104 | # simple diff check |
00a26390 | 105 | for i in $FILES; do |
aeafd623 JO |
106 | check $i -B |
107 | done | |
108 | ||
109 | # diff with extra ignore lines | |
15019e98 JO |
110 | check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"' |
111 | check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"' | |
be709d48 | 112 | check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"' |
15019e98 | 113 | check include/uapi/linux/mman.h '-I "^#include <\(uapi/\)*asm/mman.h>"' |
3052ba56 ACM |
114 | check include/linux/ctype.h '-I "isdigit("' |
115 | check lib/ctype.c '-I "^EXPORT_SYMBOL" -I "^#include <linux/export.h>" -B' | |
87a682a7 ACM |
116 | check arch/x86/include/asm/inat.h '-I "^#include [\"<]\(asm/\)*inat_types.h[\">]"' |
117 | check arch/x86/include/asm/insn.h '-I "^#include [\"<]\(asm/\)*inat.h[\">]"' | |
118 | check arch/x86/lib/inat.c '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"' | |
119 | check arch/x86/lib/insn.c '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]"' | |
7ea6e983 | 120 | |
c9b51a01 JO |
121 | # diff non-symmetric files |
122 | check_2 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl | |
123 | ||
7ea6e983 | 124 | cd tools/perf |