Josh Poimboeuf | 3bd51c5 | 2017-11-06 07:21:51 -0600 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | |
| 4 | FILES=' |
Josh Poimboeuf | 3bd51c5 | 2017-11-06 07:21:51 -0600 | [diff] [blame] | 5 | arch/x86/include/asm/inat_types.h |
| 6 | arch/x86/include/asm/orc_types.h |
Masami Hiramatsu | 4d65adf | 2019-09-06 22:14:10 +0900 | [diff] [blame] | 7 | arch/x86/include/asm/emulate_prefix.h |
Josh Poimboeuf | d046b72 | 2019-08-29 17:41:18 -0500 | [diff] [blame] | 8 | arch/x86/lib/x86-opcode-map.txt |
| 9 | arch/x86/tools/gen-insn-attr-x86.awk |
Josh Poimboeuf | 1e7e478 | 2020-08-18 15:57:45 +0200 | [diff] [blame^] | 10 | include/linux/static_call_types.h |
Josh Poimboeuf | 3bd51c5 | 2017-11-06 07:21:51 -0600 | [diff] [blame] | 11 | ' |
| 12 | |
Arnaldo Carvalho de Melo | 2ffd84a | 2019-08-31 17:29:47 -0300 | [diff] [blame] | 13 | check_2 () { |
| 14 | file1=$1 |
| 15 | file2=$2 |
Josh Poimboeuf | 3bd51c5 | 2017-11-06 07:21:51 -0600 | [diff] [blame] | 16 | |
Arnaldo Carvalho de Melo | 2ffd84a | 2019-08-31 17:29:47 -0300 | [diff] [blame] | 17 | shift |
| 18 | shift |
| 19 | |
| 20 | cmd="diff $* $file1 $file2 > /dev/null" |
| 21 | |
| 22 | test -f $file2 && { |
| 23 | eval $cmd || { |
| 24 | echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2 |
| 25 | echo diff -u $file1 $file2 |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | check () { |
| 31 | file=$1 |
| 32 | |
| 33 | shift |
| 34 | |
| 35 | check_2 tools/$file $file $* |
Josh Poimboeuf | 3bd51c5 | 2017-11-06 07:21:51 -0600 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then |
| 39 | exit 0 |
| 40 | fi |
| 41 | |
Arnaldo Carvalho de Melo | 2ffd84a | 2019-08-31 17:29:47 -0300 | [diff] [blame] | 42 | cd ../.. |
| 43 | |
Josh Poimboeuf | 3bd51c5 | 2017-11-06 07:21:51 -0600 | [diff] [blame] | 44 | for i in $FILES; do |
| 45 | check $i |
| 46 | done |
Arnaldo Carvalho de Melo | 2ffd84a | 2019-08-31 17:29:47 -0300 | [diff] [blame] | 47 | |
Arnaldo Carvalho de Melo | ae31a51 | 2019-08-31 17:35:53 -0300 | [diff] [blame] | 48 | check arch/x86/include/asm/inat.h '-I "^#include [\"<]\(asm/\)*inat_types.h[\">]"' |
| 49 | check arch/x86/include/asm/insn.h '-I "^#include [\"<]\(asm/\)*inat.h[\">]"' |
| 50 | check arch/x86/lib/inat.c '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"' |
Masami Hiramatsu | 4d65adf | 2019-09-06 22:14:10 +0900 | [diff] [blame] | 51 | check arch/x86/lib/insn.c '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]"' |