x86/asm/entry: Move the arch/x86/syscalls/ definitions to arch/x86/entry/syscalls/
The build time generated syscall definitions are entry code related, move them into the arch/x86/entry/ directory. Cc: Borislav Petkov <bp@alien8.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Brian Gerst <brgerst@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
27
arch/x86/entry/syscalls/syscallhdr.sh
Normal file
27
arch/x86/entry/syscalls/syscallhdr.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
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 ""
|
||||
|
||||
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
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "#endif /* ${fileguard} */"
|
||||
) > "$out"
|
Reference in New Issue
Block a user