diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-11-18 20:01:19 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-11-18 20:01:19 -0500 |
commit | 3f86886c72fb68088162c7e08cc7f85282f1860c (patch) | |
tree | 95d77511e20f007f445581aa9efe05d2adc019e3 /arch | |
parent | 61f1e7e20874e8f11dab69b6a4bf7616badd4fe8 (diff) |
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@gmail.com>
Link: http://lkml.kernel.org/r/1321569446-20433-7-git-send-email-hpa@linux.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 b3c593072785..31fd5f1f38f7 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 | ( | |||
15 | echo "" | 15 | echo "" |
16 | 16 | ||
17 | while read nr abi name entry ; do | 17 | while read nr abi name entry ; do |
18 | echo "#define __NR_${prefix}${name}" $((nr+offset)) | 18 | if [ -z "$offset" ]; then |
19 | echo "#define __NR_${prefix}${name} $nr" | ||
20 | else | ||
21 | echo "#define __NR_${prefix}${name} ($offset + $nr)" | ||
22 | fi | ||
19 | done | 23 | done |
20 | 24 | ||
21 | echo "" | 25 | echo "" |