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