aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/syscalls/syscalltbl.sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 11:14:52 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 11:14:52 -0800
commita5f2bd479f58f171a16a9a4f3b4e748ab3057c0f (patch)
tree463ddd898629b602c58eb13d12591d79afe47b54 /arch/parisc/kernel/syscalls/syscalltbl.sh
parentMerge tag 'mips_4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux (diff)
parentparisc: syscalls: ignore nfsservctl for other architectures (diff)
downloadlinux-dev-a5f2bd479f58f171a16a9a4f3b4e748ab3057c0f.tar.xz
linux-dev-a5f2bd479f58f171a16a9a4f3b4e748ab3057c0f.zip
Merge branch 'parisc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "The major change in this patchset is the new system call table generation support from Firoz Khan" * 'parisc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: syscalls: ignore nfsservctl for other architectures parisc: generate uapi header and system call table files parisc: add system call table generation support parisc: remove __NR_Linux from uapi header file. parisc: add __NR_syscalls along with __NR_Linux_syscalls parisc: move __IGNORE* entries to non uapi header parisc: Fix HP SDC hpa address output parisc: Fix serio address output parisc: Split out alternative live patching code
Diffstat (limited to 'arch/parisc/kernel/syscalls/syscalltbl.sh')
-rw-r--r--arch/parisc/kernel/syscalls/syscalltbl.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh
new file mode 100644
index 000000000000..45b5bae26240
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscalltbl.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+in="$1"
+out="$2"
+my_abis=`echo "($3)" | tr ',' '|'`
+my_abi="$4"
+offset="$5"
+
+emit() {
+ t_nxt="$1"
+ t_nr="$2"
+ t_entry="$3"
+
+ while [ $t_nxt -lt $t_nr ]; do
+ printf "__SYSCALL(%s, sys_ni_syscall, )\n" "${t_nxt}"
+ t_nxt=$((t_nxt+1))
+ done
+ printf "__SYSCALL(%s, %s, )\n" "${t_nxt}" "${t_entry}"
+}
+
+grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
+ nxt=0
+ if [ -z "$offset" ]; then
+ offset=0
+ fi
+
+ while read nr abi name entry compat ; do
+ if [ "$my_abi" = "c32" ] && [ ! -z "$compat" ]; then
+ emit $((nxt+offset)) $((nr+offset)) $compat
+ else
+ emit $((nxt+offset)) $((nr+offset)) $entry
+ fi
+ nxt=$((nr+1))
+ done
+) > "$out"