blob: 50cd6228f50637def472cf75ce37ed9bba759a10 [file] [log] [blame]
Jiri Olsaaeafd622016-12-06 14:18:51 +01001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Jiri Olsaaeafd622016-12-06 14:18:51 +01003
4HEADERS='
Arnaldo Carvalho de Meloc1737f22017-07-31 16:45:32 -03005include/uapi/drm/drm.h
6include/uapi/drm/i915_drm.h
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -03007include/uapi/linux/fcntl.h
Arnaldo Carvalho de Melo3ce97512017-07-31 16:45:32 -03008include/uapi/linux/kvm.h
Jiri Olsaaeafd622016-12-06 14:18:51 +01009include/uapi/linux/perf_event.h
Arnaldo Carvalho de Melo450c86c2017-07-20 10:46:34 -030010include/uapi/linux/sched.h
Arnaldo Carvalho de Melo67ef2872017-03-30 11:16:59 -030011include/uapi/linux/stat.h
Arnaldo Carvalho de Melod02b3952017-07-31 16:45:32 -030012include/uapi/linux/vhost.h
Arnaldo Carvalho de Meloa215684e2017-07-31 16:45:32 -030013include/uapi/sound/asound.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010014include/linux/hash.h
15include/uapi/linux/hw_breakpoint.h
16arch/x86/include/asm/disabled-features.h
17arch/x86/include/asm/required-features.h
18arch/x86/include/asm/cpufeatures.h
19arch/arm/include/uapi/asm/perf_regs.h
20arch/arm64/include/uapi/asm/perf_regs.h
21arch/powerpc/include/uapi/asm/perf_regs.h
22arch/x86/include/uapi/asm/perf_regs.h
23arch/x86/include/uapi/asm/kvm.h
24arch/x86/include/uapi/asm/kvm_perf.h
25arch/x86/include/uapi/asm/svm.h
Arnaldo Carvalho de Melo047726d2017-07-18 17:09:21 -030026arch/x86/include/uapi/asm/unistd.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010027arch/x86/include/uapi/asm/vmx.h
28arch/powerpc/include/uapi/asm/kvm.h
29arch/s390/include/uapi/asm/kvm.h
30arch/s390/include/uapi/asm/kvm_perf.h
31arch/s390/include/uapi/asm/sie.h
32arch/arm/include/uapi/asm/kvm.h
33arch/arm64/include/uapi/asm/kvm.h
34include/asm-generic/bitops/arch_hweight.h
35include/asm-generic/bitops/const_hweight.h
36include/asm-generic/bitops/__fls.h
37include/asm-generic/bitops/fls.h
38include/asm-generic/bitops/fls64.h
39include/linux/coresight-pmu.h
Arnaldo Carvalho de Melo6375f0a2017-07-31 22:52:28 -030040include/uapi/asm-generic/ioctls.h
Jiri Olsaaeafd622016-12-06 14:18:51 +010041include/uapi/asm-generic/mman-common.h
42'
43
44check () {
45 file=$1
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030046 opts="--ignore-blank-lines --ignore-space-change"
Jiri Olsaaeafd622016-12-06 14:18:51 +010047
48 shift
49 while [ -n "$*" ]; do
50 opts="$opts \"$1\""
51 shift
52 done
53
54 cmd="diff $opts ../$file ../../$file > /dev/null"
55
56 test -f ../../$file &&
Ingo Molnarc59796d2017-07-30 11:37:47 +020057 eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
Jiri Olsaaeafd622016-12-06 14:18:51 +010058}
59
60
61# simple diff check
62for i in $HEADERS; do
63 check $i -B
64done
65
66# diff with extra ignore lines
Arnaldo Carvalho de Melo470de0f2017-07-31 22:55:12 -030067check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
68check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
69check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
70check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"