blob: 3f0c6577f8cc9856caff6db7f94f5ef80724a0fb [file] [log] [blame]
Jiri Olsaaeafd622016-12-06 14:18:51 +01001#!/bin/sh
2
3HEADERS='
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -03004include/uapi/linux/fcntl.h
Jiri Olsaaeafd622016-12-06 14:18:51 +01005include/uapi/linux/perf_event.h
Arnaldo Carvalho de Melo450c86c2017-07-20 10:46:34 -03006include/uapi/linux/sched.h
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -03007include/uapi/linux/stat.h
Jiri Olsaaeafd622016-12-06 14:18:51 +01008include/linux/hash.h
9include/uapi/linux/hw_breakpoint.h
10arch/x86/include/asm/disabled-features.h
11arch/x86/include/asm/required-features.h
12arch/x86/include/asm/cpufeatures.h
13arch/arm/include/uapi/asm/perf_regs.h
14arch/arm64/include/uapi/asm/perf_regs.h
15arch/powerpc/include/uapi/asm/perf_regs.h
16arch/x86/include/uapi/asm/perf_regs.h
17arch/x86/include/uapi/asm/kvm.h
18arch/x86/include/uapi/asm/kvm_perf.h
19arch/x86/include/uapi/asm/svm.h
Arnaldo Carvalho de Melo047726d2017-07-18 17:09:21 -030020arch/x86/include/uapi/asm/unistd.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010021arch/x86/include/uapi/asm/vmx.h
22arch/powerpc/include/uapi/asm/kvm.h
23arch/s390/include/uapi/asm/kvm.h
24arch/s390/include/uapi/asm/kvm_perf.h
25arch/s390/include/uapi/asm/sie.h
26arch/arm/include/uapi/asm/kvm.h
27arch/arm64/include/uapi/asm/kvm.h
28include/asm-generic/bitops/arch_hweight.h
29include/asm-generic/bitops/const_hweight.h
30include/asm-generic/bitops/__fls.h
31include/asm-generic/bitops/fls.h
32include/asm-generic/bitops/fls64.h
33include/linux/coresight-pmu.h
Arnaldo Carvalho de Melo6375f0a2017-07-31 22:52:28 -030034include/uapi/asm-generic/ioctls.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010035include/uapi/asm-generic/mman-common.h
36'
37
38check () {
39 file=$1
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030040 opts="--ignore-blank-lines --ignore-space-change"
Jiri Olsaaeafd622016-12-06 14:18:51 +010041
42 shift
43 while [ -n "$*" ]; do
44 opts="$opts \"$1\""
45 shift
46 done
47
48 cmd="diff $opts ../$file ../../$file > /dev/null"
49
50 test -f ../../$file &&
Ingo Molnarc59796d2017-07-30 11:37:47 +020051 eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
Jiri Olsaaeafd622016-12-06 14:18:51 +010052}
53
54
55# simple diff check
56for i in $HEADERS; do
57 check $i -B
58done
59
60# diff with extra ignore lines
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030061check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
62check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
63check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
64check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"