aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64/syscalls.c
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-01 11:58:55 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:55 -0400
commit80f9507886076de0cadfdf2b87701e68156829c2 (patch)
treed9830aeda24b0a004938bae36db3e8efba84b7db /arch/um/sys-x86_64/syscalls.c
parentddcd6b175793839e51fdd55debb670a9f512c448 (diff)
[PATCH] uml: fix syscall table by including $(SUBARCH)'s one, for x86-64
Reuse asm-x86-64/unistd.h to build our syscall table, like x86-64 already does. Like for i386, we must add some #defines for all the (right!) changes UML does to x86-64 syscall table. Note: I noted a bogus: [ __NR_sched_yield ] = (syscall_handler_t *) yield, while doing this patch (which could only be a workaround for some strange bug, but I would ignore this possibility). I'm changing this without notice. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/sys-x86_64/syscalls.c')
-rw-r--r--arch/um/sys-x86_64/syscalls.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c
index 68205a03364c..15768c96ceb4 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86_64/syscalls.c
@@ -14,6 +14,7 @@
14#include "asm/prctl.h" /* XXX This should get the constants from libc */ 14#include "asm/prctl.h" /* XXX This should get the constants from libc */
15#include "choose-mode.h" 15#include "choose-mode.h"
16 16
17/* XXX: copied from x86-64: arch/x86_64/kernel/sys_x86_64.c */
17asmlinkage long wrap_sys_shmat(int shmid, char __user *shmaddr, int shmflg) 18asmlinkage long wrap_sys_shmat(int shmid, char __user *shmaddr, int shmflg)
18{ 19{
19 unsigned long raddr; 20 unsigned long raddr;
@@ -21,6 +22,17 @@ asmlinkage long wrap_sys_shmat(int shmid, char __user *shmaddr, int shmflg)
21 return do_shmat(shmid, shmaddr, shmflg, &raddr) ?: (long) raddr; 22 return do_shmat(shmid, shmaddr, shmflg, &raddr) ?: (long) raddr;
22} 23}
23 24
25asmlinkage long sys_uname64(struct new_utsname __user * name)
26{
27 int err;
28 down_read(&uts_sem);
29 err = copy_to_user(name, &system_utsname, sizeof (*name));
30 up_read(&uts_sem);
31 if (personality(current->personality) == PER_LINUX32)
32 err |= copy_to_user(&name->machine, "i686", 5);
33 return err ? -EFAULT : 0;
34}
35
24#ifdef CONFIG_MODE_TT 36#ifdef CONFIG_MODE_TT
25extern int modify_ldt(int func, void *ptr, unsigned long bytecount); 37extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
26 38