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 | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 6 | include/uapi/linux/stat.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 7 | include/linux/hash.h |
| 8 | include/uapi/linux/hw_breakpoint.h |
| 9 | arch/x86/include/asm/disabled-features.h |
| 10 | arch/x86/include/asm/required-features.h |
| 11 | arch/x86/include/asm/cpufeatures.h |
| 12 | arch/arm/include/uapi/asm/perf_regs.h |
| 13 | arch/arm64/include/uapi/asm/perf_regs.h |
| 14 | arch/powerpc/include/uapi/asm/perf_regs.h |
| 15 | arch/x86/include/uapi/asm/perf_regs.h |
| 16 | arch/x86/include/uapi/asm/kvm.h |
| 17 | arch/x86/include/uapi/asm/kvm_perf.h |
| 18 | arch/x86/include/uapi/asm/svm.h |
| 19 | arch/x86/include/uapi/asm/vmx.h |
| 20 | arch/powerpc/include/uapi/asm/kvm.h |
| 21 | arch/s390/include/uapi/asm/kvm.h |
| 22 | arch/s390/include/uapi/asm/kvm_perf.h |
| 23 | arch/s390/include/uapi/asm/sie.h |
| 24 | arch/arm/include/uapi/asm/kvm.h |
| 25 | arch/arm64/include/uapi/asm/kvm.h |
| 26 | include/asm-generic/bitops/arch_hweight.h |
| 27 | include/asm-generic/bitops/const_hweight.h |
| 28 | include/asm-generic/bitops/__fls.h |
| 29 | include/asm-generic/bitops/fls.h |
| 30 | include/asm-generic/bitops/fls64.h |
| 31 | include/linux/coresight-pmu.h |
| 32 | include/uapi/asm-generic/mman-common.h |
| 33 | ' |
| 34 | |
| 35 | check () { |
| 36 | file=$1 |
| 37 | opts= |
| 38 | |
| 39 | shift |
| 40 | while [ -n "$*" ]; do |
| 41 | opts="$opts \"$1\"" |
| 42 | shift |
| 43 | done |
| 44 | |
| 45 | cmd="diff $opts ../$file ../../$file > /dev/null" |
| 46 | |
| 47 | test -f ../../$file && |
| 48 | eval $cmd || echo "Warning: $file differs from kernel" >&2 |
| 49 | } |
| 50 | |
| 51 | |
| 52 | # simple diff check |
| 53 | for i in $HEADERS; do |
| 54 | check $i -B |
| 55 | done |
| 56 | |
| 57 | # diff with extra ignore lines |
| 58 | check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 59 | check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 60 | check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" |
| 61 | check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>" |