blob: 9b6295809a3b074d1db1515d2f6243211ec83c27 [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
34include/uapi/asm-generic/mman-common.h
35'
36
37check () {
38 file=$1
39 opts=
40
41 shift
42 while [ -n "$*" ]; do
43 opts="$opts \"$1\""
44 shift
45 done
46
47 cmd="diff $opts ../$file ../../$file > /dev/null"
48
49 test -f ../../$file &&
50 eval $cmd || echo "Warning: $file differs from kernel" >&2
51}
52
53
54# simple diff check
55for i in $HEADERS; do
56 check $i -B
57done
58
59# diff with extra ignore lines
60check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
61check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
62check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
63check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>"