summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/entry.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-26 15:54:47 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-29 04:44:45 +0100
commitdfe09ae0e5fe40679af05b1ba810d469844c97b3 (patch)
tree0131917cc3c8f7e1cb5126e43064a01d2e1cab1c /arch/alpha/kernel/entry.S
parents390: switch to generic fork/vfork/clone (diff)
downloadlinux-dfe09ae0e5fe40679af05b1ba810d469844c97b3.tar.xz
linux-dfe09ae0e5fe40679af05b1ba810d469844c97b3.zip
alpha: switch to generic fork/vfork/clone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/alpha/kernel/entry.S')
-rw-r--r--arch/alpha/kernel/entry.S42
1 files changed, 11 insertions, 31 deletions
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index c245de65c61b..f62a994ef126 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -612,44 +612,24 @@ ret_from_kernel_thread:
* Special system calls. Most of these are special in that they either
* have to play switch_stack games or in some way use the pt_regs struct.
*/
+
+.macro fork_like name
.align 4
- .globl sys_fork
- .ent sys_fork
-sys_fork:
+ .globl alpha_\name
+ .ent alpha_\name
+alpha_\name:
.prologue 0
bsr $1, do_switch_stack
- bis $31, SIGCHLD, $16
- mov $31, $17
- mov $31, $18
- mov $31, $19
- mov $31, $20
- jsr $26, alpha_clone
-fork_out:
+ jsr $26, sys_\name
ldq $26, 56($sp)
lda $sp, SWITCH_STACK_SIZE($sp)
ret
-.end sys_fork
-
- .align 4
- .globl sys_clone
- .ent sys_clone
-sys_clone:
- .prologue 0
- bsr $1, do_switch_stack
- /* $16, $17, $18, $19, $20 come from the user. */
- lda $26, fork_out
- jsr $31, alpha_clone
-.end sys_clone
+.end alpha_\name
+.endm
- .align 4
- .globl sys_vfork
- .ent sys_vfork
-sys_vfork:
- .prologue 0
- bsr $1, do_switch_stack
- lda $26, fork_out
- jsr $31, alpha_vfork
-.end sys_vfork
+fork_like fork
+fork_like vfork
+fork_like clone
.align 4
.globl sys_sigreturn