blob: 1e07c9b062de24a140000721ed79591a69ce0974 [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
Jiri Olsaaeafd622016-12-06 14:18:51 +01007include/uapi/linux/perf_event.h
Arnaldo Carvalho de Melo450c86c2017-07-20 10:46:34 -03008include/uapi/linux/sched.h
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -03009include/uapi/linux/stat.h
Arnaldo Carvalho de Meloa215684e2017-07-31 16:45:32 -030010include/uapi/sound/asound.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010011include/linux/hash.h
12include/uapi/linux/hw_breakpoint.h
13arch/x86/include/asm/disabled-features.h
14arch/x86/include/asm/required-features.h
15arch/x86/include/asm/cpufeatures.h
16arch/arm/include/uapi/asm/perf_regs.h
17arch/arm64/include/uapi/asm/perf_regs.h
18arch/powerpc/include/uapi/asm/perf_regs.h
19arch/x86/include/uapi/asm/perf_regs.h
20arch/x86/include/uapi/asm/kvm.h
21arch/x86/include/uapi/asm/kvm_perf.h
22arch/x86/include/uapi/asm/svm.h
Arnaldo Carvalho de Melo047726d2017-07-18 17:09:21 -030023arch/x86/include/uapi/asm/unistd.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010024arch/x86/include/uapi/asm/vmx.h
25arch/powerpc/include/uapi/asm/kvm.h
26arch/s390/include/uapi/asm/kvm.h
27arch/s390/include/uapi/asm/kvm_perf.h
28arch/s390/include/uapi/asm/sie.h
29arch/arm/include/uapi/asm/kvm.h
30arch/arm64/include/uapi/asm/kvm.h
31include/asm-generic/bitops/arch_hweight.h
32include/asm-generic/bitops/const_hweight.h
33include/asm-generic/bitops/__fls.h
34include/asm-generic/bitops/fls.h
35include/asm-generic/bitops/fls64.h
36include/linux/coresight-pmu.h
Arnaldo Carvalho de Melo6375f0a2017-07-31 22:52:28 -030037include/uapi/asm-generic/ioctls.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010038include/uapi/asm-generic/mman-common.h
39'
40
41check () {
42 file=$1
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030043 opts="--ignore-blank-lines --ignore-space-change"
Jiri Olsaaeafd622016-12-06 14:18:51 +010044
45 shift
46 while [ -n "$*" ]; do
47 opts="$opts \"$1\""
48 shift
49 done
50
51 cmd="diff $opts ../$file ../../$file > /dev/null"
52
53 test -f ../../$file &&
Ingo Molnarc59796d2017-07-30 11:37:47 +020054 eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
Jiri Olsaaeafd622016-12-06 14:18:51 +010055}
56
57
58# simple diff check
59for i in $HEADERS; do
60 check $i -B
61done
62
63# diff with extra ignore lines
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030064check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
65check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
66check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
67check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"