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