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