Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | HEADERS=' |
Arnaldo Carvalho de Melo | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 4 | include/uapi/linux/fcntl.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 5 | include/uapi/linux/perf_event.h |
Arnaldo Carvalho de Melo | 450c86c | 2017-07-20 10:46:34 -0300 | [diff] [blame^] | 6 | include/uapi/linux/sched.h |
Arnaldo Carvalho de Melo | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 7 | include/uapi/linux/stat.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 8 | include/linux/hash.h |
| 9 | include/uapi/linux/hw_breakpoint.h |
| 10 | arch/x86/include/asm/disabled-features.h |
| 11 | arch/x86/include/asm/required-features.h |
| 12 | arch/x86/include/asm/cpufeatures.h |
| 13 | arch/arm/include/uapi/asm/perf_regs.h |
| 14 | arch/arm64/include/uapi/asm/perf_regs.h |
| 15 | arch/powerpc/include/uapi/asm/perf_regs.h |
| 16 | arch/x86/include/uapi/asm/perf_regs.h |
| 17 | arch/x86/include/uapi/asm/kvm.h |
| 18 | arch/x86/include/uapi/asm/kvm_perf.h |
| 19 | arch/x86/include/uapi/asm/svm.h |
Arnaldo Carvalho de Melo | 047726d | 2017-07-18 17:09:21 -0300 | [diff] [blame] | 20 | arch/x86/include/uapi/asm/unistd.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 21 | arch/x86/include/uapi/asm/vmx.h |
| 22 | arch/powerpc/include/uapi/asm/kvm.h |
| 23 | arch/s390/include/uapi/asm/kvm.h |
| 24 | arch/s390/include/uapi/asm/kvm_perf.h |
| 25 | arch/s390/include/uapi/asm/sie.h |
| 26 | arch/arm/include/uapi/asm/kvm.h |
| 27 | arch/arm64/include/uapi/asm/kvm.h |
| 28 | include/asm-generic/bitops/arch_hweight.h |
| 29 | include/asm-generic/bitops/const_hweight.h |
| 30 | include/asm-generic/bitops/__fls.h |
| 31 | include/asm-generic/bitops/fls.h |
| 32 | include/asm-generic/bitops/fls64.h |
| 33 | include/linux/coresight-pmu.h |
| 34 | include/uapi/asm-generic/mman-common.h |
| 35 | ' |
| 36 | |
| 37 | check () { |
| 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 |
| 55 | for i in $HEADERS; do |
| 56 | check $i -B |
| 57 | done |
| 58 | |
| 59 | # diff with extra ignore lines |
| 60 | check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 61 | check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 62 | check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" |
| 63 | check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>" |