Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | HEADERS=' |
Arnaldo Carvalho de Melo | c1737f2 | 2017-07-31 16:45:32 -0300 | [diff] [blame] | 4 | include/uapi/drm/drm.h |
| 5 | include/uapi/drm/i915_drm.h |
Arnaldo Carvalho de Melo | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 6 | include/uapi/linux/fcntl.h |
Arnaldo Carvalho de Melo | 3ce9751 | 2017-07-31 16:45:32 -0300 | [diff] [blame^] | 7 | include/uapi/linux/kvm.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 8 | include/uapi/linux/perf_event.h |
Arnaldo Carvalho de Melo | 450c86c | 2017-07-20 10:46:34 -0300 | [diff] [blame] | 9 | include/uapi/linux/sched.h |
Arnaldo Carvalho de Melo | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 10 | include/uapi/linux/stat.h |
Arnaldo Carvalho de Melo | a215684e | 2017-07-31 16:45:32 -0300 | [diff] [blame] | 11 | include/uapi/sound/asound.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 12 | include/linux/hash.h |
| 13 | include/uapi/linux/hw_breakpoint.h |
| 14 | arch/x86/include/asm/disabled-features.h |
| 15 | arch/x86/include/asm/required-features.h |
| 16 | arch/x86/include/asm/cpufeatures.h |
| 17 | arch/arm/include/uapi/asm/perf_regs.h |
| 18 | arch/arm64/include/uapi/asm/perf_regs.h |
| 19 | arch/powerpc/include/uapi/asm/perf_regs.h |
| 20 | arch/x86/include/uapi/asm/perf_regs.h |
| 21 | arch/x86/include/uapi/asm/kvm.h |
| 22 | arch/x86/include/uapi/asm/kvm_perf.h |
| 23 | arch/x86/include/uapi/asm/svm.h |
Arnaldo Carvalho de Melo | 047726d | 2017-07-18 17:09:21 -0300 | [diff] [blame] | 24 | arch/x86/include/uapi/asm/unistd.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 25 | arch/x86/include/uapi/asm/vmx.h |
| 26 | arch/powerpc/include/uapi/asm/kvm.h |
| 27 | arch/s390/include/uapi/asm/kvm.h |
| 28 | arch/s390/include/uapi/asm/kvm_perf.h |
| 29 | arch/s390/include/uapi/asm/sie.h |
| 30 | arch/arm/include/uapi/asm/kvm.h |
| 31 | arch/arm64/include/uapi/asm/kvm.h |
| 32 | include/asm-generic/bitops/arch_hweight.h |
| 33 | include/asm-generic/bitops/const_hweight.h |
| 34 | include/asm-generic/bitops/__fls.h |
| 35 | include/asm-generic/bitops/fls.h |
| 36 | include/asm-generic/bitops/fls64.h |
| 37 | include/linux/coresight-pmu.h |
Arnaldo Carvalho de Melo | 6375f0a | 2017-07-31 22:52:28 -0300 | [diff] [blame] | 38 | include/uapi/asm-generic/ioctls.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 39 | include/uapi/asm-generic/mman-common.h |
| 40 | ' |
| 41 | |
| 42 | check () { |
| 43 | file=$1 |
Arnaldo Carvalho de Melo | 470de0f | 2017-07-31 22:55:12 -0300 | [diff] [blame] | 44 | opts="--ignore-blank-lines --ignore-space-change" |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 45 | |
| 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 Molnar | c59796d | 2017-07-30 11:37:47 +0200 | [diff] [blame] | 55 | eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2 |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | |
| 59 | # simple diff check |
| 60 | for i in $HEADERS; do |
| 61 | check $i -B |
| 62 | done |
| 63 | |
| 64 | # diff with extra ignore lines |
Arnaldo Carvalho de Melo | 470de0f | 2017-07-31 22:55:12 -0300 | [diff] [blame] | 65 | check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 66 | check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 67 | check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" |
| 68 | check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>" |