aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/process.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-10-14 14:34:33 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-10-14 14:34:33 -0400
commitd929b6aeaacbe78cbfef4a80e3eed1bf0464d984 (patch)
tree5f121a845d616a3926768c2fa1b25c4ae417d9c2 /arch/tile/kernel/process.c
parentce0ecc8abfa9904e27a5f3ac4dd83398b134278d (diff)
arch/tile: Use <asm-generic/syscalls.h>
With this change we now include <asm-generic/syscalls.h> into the "tile" version of the header. To take full advantage of the prototypes there, we also change our naming convention for "struct pt_regs *" syscalls so that, e.g., _sys_execve() is the "true" syscall entry, which sets the appropriate register to point to the pt_regs before calling sys_execve(). While doing this I realized I no longer needed the fork and vfork entry point stubs, since those functions aren't in the generic syscall ABI, so I removed them as well. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/process.c')
-rw-r--r--arch/tile/kernel/process.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c
index 84c29111756c..42ff73d5f637 100644
--- a/arch/tile/kernel/process.c
+++ b/arch/tile/kernel/process.c
@@ -528,14 +528,9 @@ struct task_struct *__sched _switch_to(struct task_struct *prev,
528 return __switch_to(prev, next, next_current_ksp0(next)); 528 return __switch_to(prev, next, next_current_ksp0(next));
529} 529}
530 530
531long _sys_fork(struct pt_regs *regs) 531SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
532{ 532 void __user *, parent_tidptr, void __user *, child_tidptr,
533 return do_fork(SIGCHLD, regs->sp, regs, 0, NULL, NULL); 533 struct pt_regs *, regs)
534}
535
536long _sys_clone(unsigned long clone_flags, unsigned long newsp,
537 void __user *parent_tidptr, void __user *child_tidptr,
538 struct pt_regs *regs)
539{ 534{
540 if (!newsp) 535 if (!newsp)
541 newsp = regs->sp; 536 newsp = regs->sp;
@@ -543,18 +538,13 @@ long _sys_clone(unsigned long clone_flags, unsigned long newsp,
543 parent_tidptr, child_tidptr); 538 parent_tidptr, child_tidptr);
544} 539}
545 540
546long _sys_vfork(struct pt_regs *regs)
547{
548 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->sp,
549 regs, 0, NULL, NULL);
550}
551
552/* 541/*
553 * sys_execve() executes a new program. 542 * sys_execve() executes a new program.
554 */ 543 */
555long _sys_execve(const char __user *path, 544SYSCALL_DEFINE4(execve, const char __user *, path,
556 const char __user *const __user *argv, 545 const char __user *const __user *, argv,
557 const char __user *const __user *envp, struct pt_regs *regs) 546 const char __user *const __user *, envp,
547 struct pt_regs *, regs)
558{ 548{
559 long error; 549 long error;
560 char *filename; 550 char *filename;
@@ -570,9 +560,10 @@ out:
570} 560}
571 561
572#ifdef CONFIG_COMPAT 562#ifdef CONFIG_COMPAT
573long _compat_sys_execve(const char __user *path, 563long compat_sys_execve(const char __user *path,
574 const compat_uptr_t __user *argv, 564 const compat_uptr_t __user *argv,
575 const compat_uptr_t __user *envp, struct pt_regs *regs) 565 const compat_uptr_t __user *envp,
566 struct pt_regs *regs)
576{ 567{
577 long error; 568 long error;
578 char *filename; 569 char *filename;