diff options
-rw-r--r-- | arch/x86/kernel/ioport.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/ldt.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/process_32.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/signal_32.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/signal_64.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/sys_i386_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/sys_x86_64.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/tls.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/vm86_32.c | 1 | ||||
-rw-r--r-- | include/asm-x86/syscalls.h | 90 |
11 files changed, 101 insertions, 0 deletions
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c index 50e5e4a31c85..191914302744 100644 --- a/arch/x86/kernel/ioport.c +++ b/arch/x86/kernel/ioport.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
16 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> |
17 | #include <asm/syscalls.h> | ||
17 | 18 | ||
18 | /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ | 19 | /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ |
19 | static void set_bitmap(unsigned long *bitmap, unsigned int base, | 20 | static void set_bitmap(unsigned long *bitmap, unsigned int base, |
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index a8449571858a..c49ff2dc8f83 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/ldt.h> | 18 | #include <asm/ldt.h> |
19 | #include <asm/desc.h> | 19 | #include <asm/desc.h> |
20 | #include <asm/mmu_context.h> | 20 | #include <asm/mmu_context.h> |
21 | #include <asm/syscalls.h> | ||
21 | 22 | ||
22 | #ifdef CONFIG_SMP | 23 | #ifdef CONFIG_SMP |
23 | static void flush_ldt(void *current_mm) | 24 | static void flush_ldt(void *current_mm) |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 0c3927accb00..6490e4981261 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <asm/tlbflush.h> | 55 | #include <asm/tlbflush.h> |
56 | #include <asm/cpu.h> | 56 | #include <asm/cpu.h> |
57 | #include <asm/kdebug.h> | 57 | #include <asm/kdebug.h> |
58 | #include <asm/syscalls.h> | ||
58 | 59 | ||
59 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); | 60 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); |
60 | 61 | ||
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index e8a8e1b99817..c78090dd0c52 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/proto.h> | 51 | #include <asm/proto.h> |
52 | #include <asm/ia32.h> | 52 | #include <asm/ia32.h> |
53 | #include <asm/idle.h> | 53 | #include <asm/idle.h> |
54 | #include <asm/syscalls.h> | ||
54 | 55 | ||
55 | asmlinkage extern void ret_from_fork(void); | 56 | asmlinkage extern void ret_from_fork(void); |
56 | 57 | ||
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 07faaa5109cb..5cede1045ce7 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
27 | #include <asm/i387.h> | 27 | #include <asm/i387.h> |
28 | #include <asm/vdso.h> | 28 | #include <asm/vdso.h> |
29 | #include <asm/syscalls.h> | ||
29 | 30 | ||
30 | #include "sigframe.h" | 31 | #include "sigframe.h" |
31 | 32 | ||
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index bf87684474f1..b95a0a609053 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/proto.h> | 26 | #include <asm/proto.h> |
27 | #include <asm/ia32_unistd.h> | 27 | #include <asm/ia32_unistd.h> |
28 | #include <asm/mce.h> | 28 | #include <asm/mce.h> |
29 | #include <asm/syscalls.h> | ||
29 | #include "sigframe.h" | 30 | #include "sigframe.h" |
30 | 31 | ||
31 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 32 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c index 7066cb855a60..1884a8d12bfa 100644 --- a/arch/x86/kernel/sys_i386_32.c +++ b/arch/x86/kernel/sys_i386_32.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <linux/unistd.h> | 23 | #include <linux/unistd.h> |
24 | 24 | ||
25 | #include <asm/syscalls.h> | ||
26 | |||
25 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | 27 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, |
26 | unsigned long prot, unsigned long flags, | 28 | unsigned long prot, unsigned long flags, |
27 | unsigned long fd, unsigned long pgoff) | 29 | unsigned long fd, unsigned long pgoff) |
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index 3b360ef33817..c9288c883e20 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/ia32.h> | 18 | #include <asm/ia32.h> |
19 | #include <asm/syscalls.h> | ||
19 | 20 | ||
20 | asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, | 21 | asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, |
21 | unsigned long fd, unsigned long off) | 22 | unsigned long fd, unsigned long off) |
diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c index ab6bf375a307..6bb7b8579e70 100644 --- a/arch/x86/kernel/tls.c +++ b/arch/x86/kernel/tls.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/ldt.h> | 10 | #include <asm/ldt.h> |
11 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
12 | #include <asm/proto.h> | 12 | #include <asm/proto.h> |
13 | #include <asm/syscalls.h> | ||
13 | 14 | ||
14 | #include "tls.h" | 15 | #include "tls.h" |
15 | 16 | ||
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index 38f566fa27d2..4eeb5cf9720d 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/io.h> | 46 | #include <asm/io.h> |
47 | #include <asm/tlbflush.h> | 47 | #include <asm/tlbflush.h> |
48 | #include <asm/irq.h> | 48 | #include <asm/irq.h> |
49 | #include <asm/syscalls.h> | ||
49 | 50 | ||
50 | /* | 51 | /* |
51 | * Known problems: | 52 | * Known problems: |
diff --git a/include/asm-x86/syscalls.h b/include/asm-x86/syscalls.h new file mode 100644 index 000000000000..170fcb132f53 --- /dev/null +++ b/include/asm-x86/syscalls.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * syscalls.h - Linux syscall interfaces (arch-specific) | ||
3 | * | ||
4 | * Copyright (c) 2008 Jaswinder Singh | ||
5 | * | ||
6 | * This file is released under the GPLv2. | ||
7 | * See the file COPYING for more details. | ||
8 | * | ||
9 | * Please do not call me directly, include linux/syscalls.h | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_X86_SYSCALLS_H | ||
13 | #define _ASM_X86_SYSCALLS_H | ||
14 | |||
15 | #include <linux/compiler.h> | ||
16 | #include <linux/linkage.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/signal.h> | ||
19 | |||
20 | /* Common in X86_32 and X86_64 */ | ||
21 | /* kernel/ioport.c */ | ||
22 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); | ||
23 | |||
24 | /* X86_32 only */ | ||
25 | #ifdef CONFIG_X86_32 | ||
26 | /* kernel/process_32.c */ | ||
27 | asmlinkage int sys_fork(struct pt_regs); | ||
28 | asmlinkage int sys_clone(struct pt_regs); | ||
29 | asmlinkage int sys_vfork(struct pt_regs); | ||
30 | asmlinkage int sys_execve(struct pt_regs); | ||
31 | |||
32 | /* kernel/signal_32.c */ | ||
33 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); | ||
34 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, | ||
35 | struct old_sigaction __user *); | ||
36 | asmlinkage int sys_sigaltstack(unsigned long); | ||
37 | asmlinkage unsigned long sys_sigreturn(unsigned long); | ||
38 | asmlinkage int sys_rt_sigreturn(unsigned long); | ||
39 | |||
40 | /* kernel/ioport.c */ | ||
41 | asmlinkage long sys_iopl(unsigned long); | ||
42 | |||
43 | /* kernel/ldt.c */ | ||
44 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | ||
45 | |||
46 | /* kernel/sys_i386_32.c */ | ||
47 | asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, | ||
48 | unsigned long, unsigned long, unsigned long); | ||
49 | struct mmap_arg_struct; | ||
50 | asmlinkage int old_mmap(struct mmap_arg_struct __user *); | ||
51 | struct sel_arg_struct; | ||
52 | asmlinkage int old_select(struct sel_arg_struct __user *); | ||
53 | asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); | ||
54 | struct old_utsname; | ||
55 | asmlinkage int sys_uname(struct old_utsname __user *); | ||
56 | struct oldold_utsname; | ||
57 | asmlinkage int sys_olduname(struct oldold_utsname __user *); | ||
58 | |||
59 | /* kernel/tls.c */ | ||
60 | asmlinkage int sys_set_thread_area(struct user_desc __user *); | ||
61 | asmlinkage int sys_get_thread_area(struct user_desc __user *); | ||
62 | |||
63 | #else /* CONFIG_X86_32 */ | ||
64 | |||
65 | /* X86_64 only */ | ||
66 | /* kernel/process_64.c */ | ||
67 | asmlinkage long sys_fork(struct pt_regs *); | ||
68 | asmlinkage long sys_clone(unsigned long, unsigned long, | ||
69 | void __user *, void __user *, | ||
70 | struct pt_regs *); | ||
71 | asmlinkage long sys_vfork(struct pt_regs *); | ||
72 | asmlinkage long sys_execve(char __user *, char __user * __user *, | ||
73 | char __user * __user *, | ||
74 | struct pt_regs *); | ||
75 | |||
76 | /* kernel/ioport.c */ | ||
77 | asmlinkage long sys_iopl(unsigned int, struct pt_regs *); | ||
78 | |||
79 | /* kernel/signal_64.c */ | ||
80 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, | ||
81 | struct pt_regs *); | ||
82 | asmlinkage long sys_rt_sigreturn(struct pt_regs *); | ||
83 | |||
84 | /* kernel/sys_x86_64.c */ | ||
85 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, | ||
86 | unsigned long, unsigned long, unsigned long); | ||
87 | asmlinkage long sys_uname(struct new_utsname __user *); | ||
88 | |||
89 | #endif /* CONFIG_X86_32 */ | ||
90 | #endif /* _ASM_X86_SYSCALLS_H */ | ||