Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 1 | #!/bin/sh |
Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0 |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 3 | |
| 4 | HEADERS=' |
Arnaldo Carvalho de Melo | c1737f2 | 2017-07-31 16:45:32 -0300 | [diff] [blame] | 5 | include/uapi/drm/drm.h |
| 6 | include/uapi/drm/i915_drm.h |
Arnaldo Carvalho de Melo | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 7 | include/uapi/linux/fcntl.h |
Arnaldo Carvalho de Melo | 735e215 | 2017-10-31 10:04:11 -0300 | [diff] [blame] | 8 | include/uapi/linux/kcmp.h |
Arnaldo Carvalho de Melo | 3ce9751 | 2017-07-31 16:45:32 -0300 | [diff] [blame] | 9 | include/uapi/linux/kvm.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 10 | include/uapi/linux/perf_event.h |
Arnaldo Carvalho de Melo | 4337279 | 2017-10-26 14:41:01 -0300 | [diff] [blame] | 11 | include/uapi/linux/prctl.h |
Arnaldo Carvalho de Melo | 450c86c | 2017-07-20 10:46:34 -0300 | [diff] [blame] | 12 | include/uapi/linux/sched.h |
Arnaldo Carvalho de Melo | 67ef287 | 2017-03-30 11:16:59 -0300 | [diff] [blame] | 13 | include/uapi/linux/stat.h |
Arnaldo Carvalho de Melo | d02b395 | 2017-07-31 16:45:32 -0300 | [diff] [blame] | 14 | include/uapi/linux/vhost.h |
Arnaldo Carvalho de Melo | a215684e | 2017-07-31 16:45:32 -0300 | [diff] [blame] | 15 | include/uapi/sound/asound.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 16 | include/linux/hash.h |
| 17 | include/uapi/linux/hw_breakpoint.h |
| 18 | arch/x86/include/asm/disabled-features.h |
| 19 | arch/x86/include/asm/required-features.h |
| 20 | arch/x86/include/asm/cpufeatures.h |
| 21 | arch/arm/include/uapi/asm/perf_regs.h |
| 22 | arch/arm64/include/uapi/asm/perf_regs.h |
| 23 | arch/powerpc/include/uapi/asm/perf_regs.h |
Arnaldo Carvalho de Melo | 10b9baa | 2017-11-28 11:08:41 -0300 | [diff] [blame] | 24 | arch/s390/include/uapi/asm/perf_regs.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 25 | arch/x86/include/uapi/asm/perf_regs.h |
| 26 | arch/x86/include/uapi/asm/kvm.h |
| 27 | arch/x86/include/uapi/asm/kvm_perf.h |
| 28 | arch/x86/include/uapi/asm/svm.h |
Arnaldo Carvalho de Melo | 047726d | 2017-07-18 17:09:21 -0300 | [diff] [blame] | 29 | arch/x86/include/uapi/asm/unistd.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 30 | arch/x86/include/uapi/asm/vmx.h |
| 31 | arch/powerpc/include/uapi/asm/kvm.h |
| 32 | arch/s390/include/uapi/asm/kvm.h |
| 33 | arch/s390/include/uapi/asm/kvm_perf.h |
Hendrik Brueckner | a81c421 | 2017-12-04 10:56:49 +0100 | [diff] [blame] | 34 | arch/s390/include/uapi/asm/ptrace.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 35 | arch/s390/include/uapi/asm/sie.h |
Hendrik Brueckner | 7af7919 | 2017-12-07 09:27:59 +0100 | [diff] [blame] | 36 | arch/s390/include/uapi/asm/unistd.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 37 | arch/arm/include/uapi/asm/kvm.h |
| 38 | arch/arm64/include/uapi/asm/kvm.h |
Hendrik Brueckner | 95f2819 | 2018-01-19 09:56:13 +0100 | [diff] [blame] | 39 | arch/alpha/include/uapi/asm/errno.h |
| 40 | arch/mips/include/asm/errno.h |
| 41 | arch/mips/include/uapi/asm/errno.h |
| 42 | arch/parisc/include/uapi/asm/errno.h |
| 43 | arch/powerpc/include/uapi/asm/errno.h |
| 44 | arch/sparc/include/uapi/asm/errno.h |
| 45 | arch/x86/include/uapi/asm/errno.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 46 | include/asm-generic/bitops/arch_hweight.h |
| 47 | include/asm-generic/bitops/const_hweight.h |
| 48 | include/asm-generic/bitops/__fls.h |
| 49 | include/asm-generic/bitops/fls.h |
| 50 | include/asm-generic/bitops/fls64.h |
| 51 | include/linux/coresight-pmu.h |
Hendrik Brueckner | 28b8f95 | 2018-01-19 09:56:14 +0100 | [diff] [blame] | 52 | include/uapi/asm-generic/errno.h |
| 53 | include/uapi/asm-generic/errno-base.h |
Arnaldo Carvalho de Melo | 6375f0a | 2017-07-31 22:52:28 -0300 | [diff] [blame] | 54 | include/uapi/asm-generic/ioctls.h |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 55 | include/uapi/asm-generic/mman-common.h |
| 56 | ' |
| 57 | |
| 58 | check () { |
| 59 | file=$1 |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 60 | |
| 61 | shift |
| 62 | while [ -n "$*" ]; do |
| 63 | opts="$opts \"$1\"" |
| 64 | shift |
| 65 | done |
| 66 | |
| 67 | cmd="diff $opts ../$file ../../$file > /dev/null" |
| 68 | |
| 69 | test -f ../../$file && |
Ingo Molnar | c59796d | 2017-07-30 11:37:47 +0200 | [diff] [blame] | 70 | 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] | 71 | } |
| 72 | |
| 73 | |
Arnaldo Carvalho de Melo | d7e05ce | 2017-10-16 15:53:08 -0300 | [diff] [blame] | 74 | # Check if we have the kernel headers (tools/perf/../../include), else |
| 75 | # we're probably on a detached tarball, so no point in trying to check |
| 76 | # differences. |
| 77 | test -d ../../include || exit 0 |
| 78 | |
Jiri Olsa | aeafd62 | 2016-12-06 14:18:51 +0100 | [diff] [blame] | 79 | # simple diff check |
| 80 | for i in $HEADERS; do |
| 81 | check $i -B |
| 82 | done |
| 83 | |
| 84 | # diff with extra ignore lines |
Arnaldo Carvalho de Melo | 470de0f | 2017-07-31 22:55:12 -0300 | [diff] [blame] | 85 | check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 86 | check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" |
| 87 | check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" |
| 88 | check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>" |