]> git.openfabrics.org - ~shefty/rdma-dev.git/commit
parisc: optimizations in copy_thread() and friends
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 5 Oct 2012 22:55:57 +0000 (18:55 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 14 Oct 2012 23:36:37 +0000 (19:36 -0400)
commitff0ab8af9c3f36e7b6f716c3b9e8811a4202eec6
tree78f5dba557a1f91b868fa0118516562b6cd28244
parent7f1f311ac7b7b9c779fd207a20369f7fa3a61ba6
parisc: optimizations in copy_thread() and friends

* in user thread case the registers had been copied as part of task_struct
already; no need to do it in copy_thread().
* no need to store kernel stack pointer into regs->r21; we know its offset
anyway.
* no need to clobber r3 in sys_fork_wrapper and friends - r28 will do just
as well and *it* will be overwritten anyway.
* no need to mess with storing the return address for child - it should just
use syscall_exit.
* no need to bother with separate stack frame for sys_clone() - just branch
there and be done with that.
* no need to bother with wrapper_exit - we need it only on the child_return,
so let's just do it there.
* use the same ksp for kernel threads and userland ones, while we are at it,
and let ret_from_kernel_execve() go through the normal syscall_exit.  More
straightforward is better here...

[fixes from jejb folded]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/parisc/kernel/entry.S
arch/parisc/kernel/process.c