1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 4FILES=' 5arch/x86/include/asm/inat.h 6arch/x86/include/asm/inat_types.h 7arch/x86/include/asm/insn.h 8arch/x86/include/asm/orc_types.h 9arch/x86/lib/inat.c 10arch/x86/lib/insn.c 11arch/x86/lib/x86-opcode-map.txt 12arch/x86/tools/gen-insn-attr-x86.awk 13' 14 15check_2 () { 16 file1=$1 17 file2=$2 18 19 shift 20 shift 21 22 cmd="diff $* $file1 $file2 > /dev/null" 23 24 test -f $file2 && { 25 eval $cmd || { 26 echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2 27 echo diff -u $file1 $file2 28 } 29 } 30} 31 32check () { 33 file=$1 34 35 shift 36 37 check_2 tools/$file $file $* 38} 39 40if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then 41 exit 0 42fi 43 44cd ../.. 45 46for i in $FILES; do 47 check $i 48done 49 50cd - 51