1#!/bin/sh 2 3HEADERS=' 4include/uapi/drm/drm.h 5include/uapi/drm/i915_drm.h 6include/uapi/linux/fcntl.h 7include/uapi/linux/kvm.h 8include/uapi/linux/perf_event.h 9include/uapi/linux/sched.h 10include/uapi/linux/stat.h 11include/uapi/linux/vhost.h 12include/uapi/sound/asound.h 13include/linux/hash.h 14include/uapi/linux/hw_breakpoint.h 15arch/x86/include/asm/disabled-features.h 16arch/x86/include/asm/required-features.h 17arch/x86/include/asm/cpufeatures.h 18arch/arm/include/uapi/asm/perf_regs.h 19arch/arm64/include/uapi/asm/perf_regs.h 20arch/powerpc/include/uapi/asm/perf_regs.h 21arch/x86/include/uapi/asm/perf_regs.h 22arch/x86/include/uapi/asm/kvm.h 23arch/x86/include/uapi/asm/kvm_perf.h 24arch/x86/include/uapi/asm/svm.h 25arch/x86/include/uapi/asm/unistd.h 26arch/x86/include/uapi/asm/vmx.h 27arch/powerpc/include/uapi/asm/kvm.h 28arch/s390/include/uapi/asm/kvm.h 29arch/s390/include/uapi/asm/kvm_perf.h 30arch/s390/include/uapi/asm/sie.h 31arch/arm/include/uapi/asm/kvm.h 32arch/arm64/include/uapi/asm/kvm.h 33include/asm-generic/bitops/arch_hweight.h 34include/asm-generic/bitops/const_hweight.h 35include/asm-generic/bitops/__fls.h 36include/asm-generic/bitops/fls.h 37include/asm-generic/bitops/fls64.h 38include/linux/coresight-pmu.h 39include/uapi/asm-generic/ioctls.h 40include/uapi/asm-generic/mman-common.h 41' 42 43check () { 44 file=$1 45 opts="--ignore-blank-lines --ignore-space-change" 46 47 shift 48 while [ -n "$*" ]; do 49 opts="$opts \"$1\"" 50 shift 51 done 52 53 cmd="diff $opts ../$file ../../$file > /dev/null" 54 55 test -f ../../$file && 56 eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2 57} 58 59 60# simple diff check 61for i in $HEADERS; do 62 check $i -B 63done 64 65# diff with extra ignore lines 66check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" 67check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" 68check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" 69check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>" 70