aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/entry/syscalls/syscallhdr.sh
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-05-17 16:38:14 +0900
committerThomas Gleixner <tglx@linutronix.de>2021-05-20 15:03:59 +0200
commit3cba325b358f86357b5ce50eb9e6633183927eee (patch)
tree8ec4e9dab2035dce78655183798b0f9b656a90c6 /arch/x86/entry/syscalls/syscallhdr.sh
parentx86/syscalls: Use __NR_syscalls instead of __NR_syscall_max (diff)
downloadlinux-dev-3cba325b358f86357b5ce50eb9e6633183927eee.tar.xz
linux-dev-3cba325b358f86357b5ce50eb9e6633183927eee.zip
x86/syscalls: Switch to generic syscallhdr.sh
Many architectures duplicate similar shell scripts. Converts x86 to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210517073815.97426-7-masahiroy@kernel.org
Diffstat (limited to 'arch/x86/entry/syscalls/syscallhdr.sh')
-rw-r--r--arch/x86/entry/syscalls/syscallhdr.sh35
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/x86/entry/syscalls/syscallhdr.sh b/arch/x86/entry/syscalls/syscallhdr.sh
deleted file mode 100644
index 75e66af06773..000000000000
--- a/arch/x86/entry/syscalls/syscallhdr.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
-
-in="$1"
-out="$2"
-my_abis=`echo "($3)" | tr ',' '|'`
-prefix="$4"
-offset="$5"
-
-fileguard=_ASM_X86_`basename "$out" | sed \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
- -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
-grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
- echo "#ifndef ${fileguard}"
- echo "#define ${fileguard} 1"
- echo ""
-
- max=0
- while read nr abi name entry ; do
- if [ -z "$offset" ]; then
- echo "#define __NR_${prefix}${name} $nr"
- else
- echo "#define __NR_${prefix}${name} ($offset + $nr)"
- fi
-
- max=$nr
- done
-
- echo ""
- echo "#ifdef __KERNEL__"
- echo "#define __NR_${prefix}syscalls $(($max + 1))"
- echo "#endif"
- echo ""
- echo "#endif /* ${fileguard} */"
-) > "$out"