mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
96a8fae0fe
Convert ARM to use a similar mechanism to x86 to generate the unistd.h system call numbers and the various kernel system call tables. This means that rather than having to edit three places (asm/unistd.h for the total number of system calls, uapi/asm/unistd.h for the system call numbers, and arch/arm/kernel/calls.S for the call table) we have only one place to edit, making the process much more simple. The scripts have knowledge of the table padding requirements, so there's no need to worry about __NR_syscalls not fitting within the immediate constant field of ALU instructions anymore. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
21 lines
574 B
Bash
21 lines
574 B
Bash
#!/bin/sh
|
|
in="$1"
|
|
out="$2"
|
|
my_abis=`echo "($3)" | tr ',' '|'`
|
|
|
|
grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
|
|
while read nr abi name entry compat; do
|
|
if [ "$abi" = "eabi" -a -n "$compat" ]; then
|
|
echo "$in: error: a compat entry for an EABI syscall ($name) makes no sense" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ -n "$entry" ]; then
|
|
if [ -z "$compat" ]; then
|
|
echo "NATIVE($nr, $entry)"
|
|
else
|
|
echo "COMPAT($nr, $entry, $compat)"
|
|
fi
|
|
fi
|
|
done
|
|
) > "$out"
|