blob: 932fda54b8a661171a0ae5430e24e0e4f9645cd5 [file] [log] [blame]
Jiri Olsaaeafd622016-12-06 14:18:51 +01001#!/bin/sh
2
3HEADERS='
Arnaldo Carvalho de Meloc1737f22017-07-31 16:45:32 -03004include/uapi/drm/drm.h
5include/uapi/drm/i915_drm.h
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -03006include/uapi/linux/fcntl.h
Arnaldo Carvalho de Melo3ce97512017-07-31 16:45:32 -03007include/uapi/linux/kvm.h
Jiri Olsaaeafd622016-12-06 14:18:51 +01008include/uapi/linux/perf_event.h
Arnaldo Carvalho de Melo450c86c2017-07-20 10:46:34 -03009include/uapi/linux/sched.h
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -030010include/uapi/linux/stat.h
Arnaldo Carvalho de Melod02b3952017-07-31 16:45:32 -030011include/uapi/linux/vhost.h
Arnaldo Carvalho de Meloa215684e2017-07-31 16:45:32 -030012include/uapi/sound/asound.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010013include/linux/hash.h
14include/uapi/linux/hw_breakpoint.h
15arch/x86/include/asm/disabled-features.h
16arch/x86/include/asm/required-features.h
17arch/x86/include/asm/cpufeatures.h
18arch/arm/include/uapi/asm/perf_regs.h
19arch/arm64/include/uapi/asm/perf_regs.h
20arch/powerpc/include/uapi/asm/perf_regs.h
21arch/x86/include/uapi/asm/perf_regs.h
22arch/x86/include/uapi/asm/kvm.h
23arch/x86/include/uapi/asm/kvm_perf.h
24arch/x86/include/uapi/asm/svm.h
Arnaldo Carvalho de Melo047726d2017-07-18 17:09:21 -030025arch/x86/include/uapi/asm/unistd.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010026arch/x86/include/uapi/asm/vmx.h
27arch/powerpc/include/uapi/asm/kvm.h
28arch/s390/include/uapi/asm/kvm.h
29arch/s390/include/uapi/asm/kvm_perf.h
30arch/s390/include/uapi/asm/sie.h
31arch/arm/include/uapi/asm/kvm.h
32arch/arm64/include/uapi/asm/kvm.h
33include/asm-generic/bitops/arch_hweight.h
34include/asm-generic/bitops/const_hweight.h
35include/asm-generic/bitops/__fls.h
36include/asm-generic/bitops/fls.h
37include/asm-generic/bitops/fls64.h
38include/linux/coresight-pmu.h
Arnaldo Carvalho de Melo6375f0a2017-07-31 22:52:28 -030039include/uapi/asm-generic/ioctls.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010040include/uapi/asm-generic/mman-common.h
41'
42
43check () {
44 file=$1
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030045 opts="--ignore-blank-lines --ignore-space-change"
Jiri Olsaaeafd622016-12-06 14:18:51 +010046
47 shift
48 while [ -n "$*" ]; do
49 opts="$opts \"$1\""
50 shift
51 done
52
53 cmd="diff $opts ../$file ../../$file > /dev/null"
54
55 test -f ../../$file &&
Ingo Molnarc59796d2017-07-30 11:37:47 +020056 eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
Jiri Olsaaeafd622016-12-06 14:18:51 +010057}
58
59
60# simple diff check
61for i in $HEADERS; do
62 check $i -B
63done
64
65# diff with extra ignore lines
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030066check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
67check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
68check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
69check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"