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