Skip to content

Commit

Permalink
powerpc: don't bother with zero-extending arguments in sys_clone()
Browse files Browse the repository at this point in the history
... since the syscall glue had been doing that for 9 years already.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 22, 2012
1 parent 53b50f9 commit 9d40127
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,6 @@ int get_unalign_ctl(struct task_struct *tsk, unsigned long adr)
return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr);
}

#define TRUNC_PTR(x) ((typeof(x))(((unsigned long)(x)) & 0xffffffff))

int sys_clone(unsigned long clone_flags, unsigned long usp,
int __user *parent_tidp, void __user *child_threadptr,
int __user *child_tidp, int p6,
Expand All @@ -1035,12 +1033,6 @@ int sys_clone(unsigned long clone_flags, unsigned long usp,
CHECK_FULL_REGS(regs);
if (usp == 0)
usp = regs->gpr[1]; /* stack pointer for child */
#ifdef CONFIG_PPC64
if (is_32bit_task()) {
parent_tidp = TRUNC_PTR(parent_tidp);
child_tidp = TRUNC_PTR(child_tidp);
}
#endif
return do_fork(clone_flags, usp, regs, 0, parent_tidp, child_tidp);
}

Expand Down

0 comments on commit 9d40127

Please sign in to comment.