diff options
-rw-r--r-- | arch/x86/entry/syscall_32.c | 4 | ||||
-rw-r--r-- | arch/x86/entry/syscall_64.c | 4 | ||||
-rw-r--r-- | arch/x86/entry/syscalls/syscalltbl.sh | 19 | ||||
-rw-r--r-- | arch/x86/kernel/asm-offsets_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/asm-offsets_64.c | 4 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_32.c | 4 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_64.c | 4 | ||||
-rw-r--r-- | arch/x86/um/user-offsets.c | 4 |
8 files changed, 29 insertions, 16 deletions
diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c index 3e2829759da2..8f895ee13a1c 100644 --- a/arch/x86/entry/syscall_32.c +++ b/arch/x86/entry/syscall_32.c | |||
@@ -6,11 +6,11 @@ | |||
6 | #include <asm/asm-offsets.h> | 6 | #include <asm/asm-offsets.h> |
7 | #include <asm/syscall.h> | 7 | #include <asm/syscall.h> |
8 | 8 | ||
9 | #define __SYSCALL_I386(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; | 9 | #define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; |
10 | #include <asm/syscalls_32.h> | 10 | #include <asm/syscalls_32.h> |
11 | #undef __SYSCALL_I386 | 11 | #undef __SYSCALL_I386 |
12 | 12 | ||
13 | #define __SYSCALL_I386(nr, sym) [nr] = sym, | 13 | #define __SYSCALL_I386(nr, sym, qual) [nr] = sym, |
14 | 14 | ||
15 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); | 15 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
16 | 16 | ||
diff --git a/arch/x86/entry/syscall_64.c b/arch/x86/entry/syscall_64.c index 3781989b180e..a1d408772ae6 100644 --- a/arch/x86/entry/syscall_64.c +++ b/arch/x86/entry/syscall_64.c | |||
@@ -6,11 +6,11 @@ | |||
6 | #include <asm/asm-offsets.h> | 6 | #include <asm/asm-offsets.h> |
7 | #include <asm/syscall.h> | 7 | #include <asm/syscall.h> |
8 | 8 | ||
9 | #define __SYSCALL_64(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; | 9 | #define __SYSCALL_64(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; |
10 | #include <asm/syscalls_64.h> | 10 | #include <asm/syscalls_64.h> |
11 | #undef __SYSCALL_64 | 11 | #undef __SYSCALL_64 |
12 | 12 | ||
13 | #define __SYSCALL_64(nr, sym) [nr] = sym, | 13 | #define __SYSCALL_64(nr, sym, qual) [nr] = sym, |
14 | 14 | ||
15 | extern long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); | 15 | extern long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
16 | 16 | ||
diff --git a/arch/x86/entry/syscalls/syscalltbl.sh b/arch/x86/entry/syscalls/syscalltbl.sh index b81479c8c5fb..cd3d3015d7df 100644 --- a/arch/x86/entry/syscalls/syscalltbl.sh +++ b/arch/x86/entry/syscalls/syscalltbl.sh | |||
@@ -3,6 +3,19 @@ | |||
3 | in="$1" | 3 | in="$1" |
4 | out="$2" | 4 | out="$2" |
5 | 5 | ||
6 | syscall_macro() { | ||
7 | abi="$1" | ||
8 | nr="$2" | ||
9 | entry="$3" | ||
10 | |||
11 | # Entry can be either just a function name or "function/qualifier" | ||
12 | real_entry="${entry%%/*}" | ||
13 | qualifier="${entry:${#real_entry}}" # Strip the function name | ||
14 | qualifier="${qualifier:1}" # Strip the slash, if any | ||
15 | |||
16 | echo "__SYSCALL_${abi}($nr, $real_entry, $qualifier)" | ||
17 | } | ||
18 | |||
6 | emit() { | 19 | emit() { |
7 | abi="$1" | 20 | abi="$1" |
8 | nr="$2" | 21 | nr="$2" |
@@ -16,15 +29,15 @@ emit() { | |||
16 | 29 | ||
17 | if [ -z "$compat" ]; then | 30 | if [ -z "$compat" ]; then |
18 | if [ -n "$entry" ]; then | 31 | if [ -n "$entry" ]; then |
19 | echo "__SYSCALL_${abi}($nr, $entry)" | 32 | syscall_macro "$abi" "$nr" "$entry" |
20 | fi | 33 | fi |
21 | else | 34 | else |
22 | echo "#ifdef CONFIG_X86_32" | 35 | echo "#ifdef CONFIG_X86_32" |
23 | if [ -n "$entry" ]; then | 36 | if [ -n "$entry" ]; then |
24 | echo "__SYSCALL_${abi}($nr, $entry)" | 37 | syscall_macro "$abi" "$nr" "$entry" |
25 | fi | 38 | fi |
26 | echo "#else" | 39 | echo "#else" |
27 | echo "__SYSCALL_${abi}($nr, $compat)" | 40 | syscall_macro "$abi" "$nr" "$compat" |
28 | echo "#endif" | 41 | echo "#endif" |
29 | fi | 42 | fi |
30 | } | 43 | } |
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c index abec4c9f1c97..fdeb0ce07c16 100644 --- a/arch/x86/kernel/asm-offsets_32.c +++ b/arch/x86/kernel/asm-offsets_32.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/lguest.h> | 7 | #include <linux/lguest.h> |
8 | #include "../../../drivers/lguest/lg.h" | 8 | #include "../../../drivers/lguest/lg.h" |
9 | 9 | ||
10 | #define __SYSCALL_I386(nr, sym) [nr] = 1, | 10 | #define __SYSCALL_I386(nr, sym, qual) [nr] = 1, |
11 | static char syscalls[] = { | 11 | static char syscalls[] = { |
12 | #include <asm/syscalls_32.h> | 12 | #include <asm/syscalls_32.h> |
13 | }; | 13 | }; |
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index 9677bf9a616f..d875f97d4e0b 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c | |||
@@ -4,11 +4,11 @@ | |||
4 | 4 | ||
5 | #include <asm/ia32.h> | 5 | #include <asm/ia32.h> |
6 | 6 | ||
7 | #define __SYSCALL_64(nr, sym) [nr] = 1, | 7 | #define __SYSCALL_64(nr, sym, qual) [nr] = 1, |
8 | static char syscalls_64[] = { | 8 | static char syscalls_64[] = { |
9 | #include <asm/syscalls_64.h> | 9 | #include <asm/syscalls_64.h> |
10 | }; | 10 | }; |
11 | #define __SYSCALL_I386(nr, sym) [nr] = 1, | 11 | #define __SYSCALL_I386(nr, sym, qual) [nr] = 1, |
12 | static char syscalls_ia32[] = { | 12 | static char syscalls_ia32[] = { |
13 | #include <asm/syscalls_32.h> | 13 | #include <asm/syscalls_32.h> |
14 | }; | 14 | }; |
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index d4669a679fd0..bfce503dffae 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c | |||
@@ -25,11 +25,11 @@ | |||
25 | 25 | ||
26 | #define old_mmap sys_old_mmap | 26 | #define old_mmap sys_old_mmap |
27 | 27 | ||
28 | #define __SYSCALL_I386(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; | 28 | #define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; |
29 | #include <asm/syscalls_32.h> | 29 | #include <asm/syscalls_32.h> |
30 | 30 | ||
31 | #undef __SYSCALL_I386 | 31 | #undef __SYSCALL_I386 |
32 | #define __SYSCALL_I386(nr, sym) [ nr ] = sym, | 32 | #define __SYSCALL_I386(nr, sym, qual) [ nr ] = sym, |
33 | 33 | ||
34 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); | 34 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
35 | 35 | ||
diff --git a/arch/x86/um/sys_call_table_64.c b/arch/x86/um/sys_call_table_64.c index 6ee5268beb05..f306413d3eb6 100644 --- a/arch/x86/um/sys_call_table_64.c +++ b/arch/x86/um/sys_call_table_64.c | |||
@@ -35,11 +35,11 @@ | |||
35 | #define stub_execveat sys_execveat | 35 | #define stub_execveat sys_execveat |
36 | #define stub_rt_sigreturn sys_rt_sigreturn | 36 | #define stub_rt_sigreturn sys_rt_sigreturn |
37 | 37 | ||
38 | #define __SYSCALL_64(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; | 38 | #define __SYSCALL_64(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ; |
39 | #include <asm/syscalls_64.h> | 39 | #include <asm/syscalls_64.h> |
40 | 40 | ||
41 | #undef __SYSCALL_64 | 41 | #undef __SYSCALL_64 |
42 | #define __SYSCALL_64(nr, sym) [ nr ] = sym, | 42 | #define __SYSCALL_64(nr, sym, qual) [ nr ] = sym, |
43 | 43 | ||
44 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); | 44 | extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
45 | 45 | ||
diff --git a/arch/x86/um/user-offsets.c b/arch/x86/um/user-offsets.c index 6c9a9c1eae32..470564bbd08e 100644 --- a/arch/x86/um/user-offsets.c +++ b/arch/x86/um/user-offsets.c | |||
@@ -9,12 +9,12 @@ | |||
9 | #include <asm/types.h> | 9 | #include <asm/types.h> |
10 | 10 | ||
11 | #ifdef __i386__ | 11 | #ifdef __i386__ |
12 | #define __SYSCALL_I386(nr, sym) [nr] = 1, | 12 | #define __SYSCALL_I386(nr, sym, qual) [nr] = 1, |
13 | static char syscalls[] = { | 13 | static char syscalls[] = { |
14 | #include <asm/syscalls_32.h> | 14 | #include <asm/syscalls_32.h> |
15 | }; | 15 | }; |
16 | #else | 16 | #else |
17 | #define __SYSCALL_64(nr, sym) [nr] = 1, | 17 | #define __SYSCALL_64(nr, sym, qual) [nr] = 1, |
18 | static char syscalls[] = { | 18 | static char syscalls[] = { |
19 | #include <asm/syscalls_64.h> | 19 | #include <asm/syscalls_64.h> |
20 | }; | 20 | }; |