Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 690
b: refs/heads/master
c: 80f9507
h: refs/heads/master
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed May 1, 2005
1 parent 3e20af6 commit 77bff4b
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 319 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ddcd6b175793839e51fdd55debb670a9f512c448
refs/heads/master: 80f9507886076de0cadfdf2b87701e68156829c2
47 changes: 1 addition & 46 deletions trunk/arch/um/include/sysdep-x86_64/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,51 +30,6 @@ extern syscall_handler_t wrap_sys_shmat;
extern syscall_handler_t sys_modify_ldt;
extern syscall_handler_t sys_arch_prctl;

#define ARCH_SYSCALLS \
[ __NR_mmap ] = (syscall_handler_t *) old_mmap, \
[ __NR_select ] = (syscall_handler_t *) sys_select, \
[ __NR_mincore ] = (syscall_handler_t *) sys_mincore, \
[ __NR_madvise ] = (syscall_handler_t *) sys_madvise, \
[ __NR_shmget ] = (syscall_handler_t *) sys_shmget, \
[ __NR_shmat ] = (syscall_handler_t *) wrap_sys_shmat, \
[ __NR_shmctl ] = (syscall_handler_t *) sys_shmctl, \
[ __NR_semop ] = (syscall_handler_t *) sys_semop, \
[ __NR_semget ] = (syscall_handler_t *) sys_semget, \
[ __NR_semctl ] = (syscall_handler_t *) sys_semctl, \
[ __NR_shmdt ] = (syscall_handler_t *) sys_shmdt, \
[ __NR_msgget ] = (syscall_handler_t *) sys_msgget, \
[ __NR_msgsnd ] = (syscall_handler_t *) sys_msgsnd, \
[ __NR_msgrcv ] = (syscall_handler_t *) sys_msgrcv, \
[ __NR_msgctl ] = (syscall_handler_t *) sys_msgctl, \
[ __NR_pivot_root ] = (syscall_handler_t *) sys_pivot_root, \
[ __NR_tuxcall ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_security ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_epoll_ctl_old ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_epoll_wait_old ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_modify_ldt ] = (syscall_handler_t *) sys_modify_ldt, \
[ __NR_arch_prctl ] = (syscall_handler_t *) sys_arch_prctl, \
[ __NR_socket ] = (syscall_handler_t *) sys_socket, \
[ __NR_connect ] = (syscall_handler_t *) sys_connect, \
[ __NR_accept ] = (syscall_handler_t *) sys_accept, \
[ __NR_recvfrom ] = (syscall_handler_t *) sys_recvfrom, \
[ __NR_recvmsg ] = (syscall_handler_t *) sys_recvmsg, \
[ __NR_sendmsg ] = (syscall_handler_t *) sys_sendmsg, \
[ __NR_bind ] = (syscall_handler_t *) sys_bind, \
[ __NR_listen ] = (syscall_handler_t *) sys_listen, \
[ __NR_getsockname ] = (syscall_handler_t *) sys_getsockname, \
[ __NR_getpeername ] = (syscall_handler_t *) sys_getpeername, \
[ __NR_socketpair ] = (syscall_handler_t *) sys_socketpair, \
[ __NR_sendto ] = (syscall_handler_t *) sys_sendto, \
[ __NR_shutdown ] = (syscall_handler_t *) sys_shutdown, \
[ __NR_setsockopt ] = (syscall_handler_t *) sys_setsockopt, \
[ __NR_getsockopt ] = (syscall_handler_t *) sys_getsockopt, \
[ __NR_iopl ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_set_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_get_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \
[ __NR_semtimedop ] = (syscall_handler_t *) sys_semtimedop, \
[ 251 ] = (syscall_handler_t *) sys_ni_syscall,

#define LAST_ARCH_SYSCALL 251
#define NR_syscalls 1024
#define NR_syscalls (__NR_syscall_max + 1)

#endif
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o mem.o memcpy.o \
ptrace.o ptrace_user.o semaphore.o sigcontext.o signal.o \
syscalls.o sysrq.o thunk.o sys_call_table.o
syscalls.o sysrq.o thunk.o syscall_table.o

USER_OBJS := ptrace_user.o sigcontext.o

Expand Down
271 changes: 0 additions & 271 deletions trunk/arch/um/sys-x86_64/sys_call_table.c

This file was deleted.

59 changes: 59 additions & 0 deletions trunk/arch/um/sys-x86_64/syscall_table.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* System call table for UML/x86-64, copied from arch/x86_64/kernel/syscall.c
* with some changes for UML. */

#include <linux/linkage.h>
#include <linux/sys.h>
#include <linux/cache.h>
#include <linux/config.h>

#define __NO_STUBS

/* Below you can see, in terms of #define's, the differences between the x86-64
* and the UML syscall table. */

/* Not going to be implemented by UML, since we have no hardware. */
#define stub_iopl sys_ni_syscall
#define sys_ioperm sys_ni_syscall

/* The UML TLS problem. Note that x86_64 does not implement this, so the below
* is needed only for the ia32 compatibility. */
/*#define sys_set_thread_area sys_ni_syscall
#define sys_get_thread_area sys_ni_syscall*/

/* For __NR_time. The x86-64 name hopefully will change from sys_time64 to
* sys_time (since the current situation is bogus). I've sent a patch to cleanup
* this. Remove below the obsoleted line. */
#define sys_time64 um_time
#define sys_time um_time

/* On UML we call it this way ("old" means it's not mmap2) */
#define sys_mmap old_mmap
/* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick.
* See arch/x86_64/kernel/sys_x86_64.c */
#define sys_uname sys_uname64

#define stub_clone sys_clone
#define stub_fork sys_fork
#define stub_vfork sys_vfork
#define stub_execve sys_execve
#define stub_rt_sigsuspend sys_rt_sigsuspend
#define stub_sigaltstack sys_sigaltstack
#define stub_rt_sigreturn sys_rt_sigreturn

#define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
#undef _ASM_X86_64_UNISTD_H_
#include <asm-x86_64/unistd.h>

#undef __SYSCALL
#define __SYSCALL(nr, sym) [ nr ] = sym,
#undef _ASM_X86_64_UNISTD_H_

typedef void (*sys_call_ptr_t)(void);

extern void sys_ni_syscall(void);

sys_call_ptr_t sys_call_table[__NR_syscall_max+1] __cacheline_aligned = {
/* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
[0 ... __NR_syscall_max] = &sys_ni_syscall,
#include <asm-x86_64/unistd.h>
};
Loading

0 comments on commit 77bff4b

Please sign in to comment.