[tip:x86/syscall] x86, syscall: Allow syscall offset to be symbolic
From: tip-bot for H. Peter Anvin
Date: Fri Nov 18 2011 - 20:08:16 EST
Commit-ID: 3f86886c72fb68088162c7e08cc7f85282f1860c
Gitweb: http://git.kernel.org/tip/3f86886c72fb68088162c7e08cc7f85282f1860c
Author: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
AuthorDate: Fri, 18 Nov 2011 17:01:19 -0800
Committer: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
CommitDate: Fri, 18 Nov 2011 17:01:19 -0800
x86, syscall: Allow syscall offset to be symbolic
Allow the specified syscall offset to be symbolic, e.g. a macro. For
offset system calls, this if nothing else makes the generated code
easier to read.
Suggested-by: H. J. Lu <hjl.tools@xxxxxxxxx>
Link: http://lkml.kernel.org/r/1321569446-20433-7-git-send-email-hpa@xxxxxxxxxxxxxxx
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
---
arch/x86/syscalls/syscallhdr.sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/syscalls/syscallhdr.sh b/arch/x86/syscalls/syscallhdr.sh
index b3c5930..31fd5f1 100644
--- a/arch/x86/syscalls/syscallhdr.sh
+++ b/arch/x86/syscalls/syscallhdr.sh
@@ -15,7 +15,11 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
echo ""
while read nr abi name entry ; do
- echo "#define __NR_${prefix}${name}" $((nr+offset))
+ if [ -z "$offset" ]; then
+ echo "#define __NR_${prefix}${name} $nr"
+ else
+ echo "#define __NR_${prefix}${name} ($offset + $nr)"
+ fi
done
echo ""
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/