blob: 6fa87de1c765218aed89904f2251df83fe93c938 [file] [log] [blame]
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -06001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4FILES='
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -06005arch/x86/include/asm/inat.h
6arch/x86/include/asm/inat_types.h
Josh Poimboeufd046b722019-08-29 17:41:18 -05007arch/x86/include/asm/insn.h
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -06008arch/x86/include/asm/orc_types.h
Josh Poimboeufd046b722019-08-29 17:41:18 -05009arch/x86/lib/inat.c
10arch/x86/lib/insn.c
11arch/x86/lib/x86-opcode-map.txt
12arch/x86/tools/gen-insn-attr-x86.awk
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -060013'
14
Arnaldo Carvalho de Melo2ffd84a2019-08-31 17:29:47 -030015check_2 () {
16 file1=$1
17 file2=$2
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -060018
Arnaldo Carvalho de Melo2ffd84a2019-08-31 17:29:47 -030019 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 $*
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -060038}
39
40if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then
41 exit 0
42fi
43
Arnaldo Carvalho de Melo2ffd84a2019-08-31 17:29:47 -030044cd ../..
45
Josh Poimboeuf3bd51c52017-11-06 07:21:51 -060046for i in $FILES; do
47 check $i
48done
Arnaldo Carvalho de Melo2ffd84a2019-08-31 17:29:47 -030049
50cd -