flagday: don't pass regs to copy_thread()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-10-22 22:51:14 -04:00
parent 135c37b83c
commit afa86fc426
34 changed files with 45 additions and 60 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ release_thread(struct task_struct *dead_task)
int
copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct *p, struct pt_regs *wontuse)
struct task_struct *p)
{
extern void ret_from_fork(void);
extern void ret_from_kernel_thread(void);
+1 -1
View File
@@ -376,7 +376,7 @@ asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
int
copy_thread(unsigned long clone_flags, unsigned long stack_start,
unsigned long stk_sz, struct task_struct *p, struct pt_regs *unused)
unsigned long stk_sz, struct task_struct *p)
{
struct thread_info *thread = task_thread_info(p);
struct pt_regs *childregs = task_pt_regs(p);
+1 -2
View File
@@ -234,8 +234,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
asmlinkage void ret_from_fork(void) asm("ret_from_fork");
int copy_thread(unsigned long clone_flags, unsigned long stack_start,
unsigned long stk_sz, struct task_struct *p,
struct pt_regs *unused)
unsigned long stk_sz, struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
unsigned long tls = p->thread.tp_value;
+1 -1
View File
@@ -299,7 +299,7 @@ asmlinkage void syscall_return(void);
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct *p, struct pt_regs *unused)
struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
+3 -3
View File
@@ -141,14 +141,14 @@ asmlinkage int bfin_clone(unsigned long clone_flags, unsigned long newsp)
int
copy_thread(unsigned long clone_flags,
unsigned long usp, unsigned long topstk,
struct task_struct *p, struct pt_regs *regs)
struct task_struct *p)
{
struct pt_regs *childregs;
unsigned long *v;
childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
v = ((unsigned long *)childregs) - 2;
if (unlikely(!regs)) {
if (unlikely(p->flags & PF_KTHREAD)) {
memset(childregs, 0, sizeof(struct pt_regs));
v[0] = usp;
v[1] = topstk;
@@ -157,7 +157,7 @@ copy_thread(unsigned long clone_flags,
__asm__ __volatile__("%0 = syscfg;":"=da"(childregs->syscfg):);
p->thread.usp = 0;
} else {
*childregs = *regs;
*childregs = *current_pt_regs();
childregs->r0 = 0;
p->thread.usp = usp ? : rdusp();
v[0] = v[1] = 0;
+1 -1
View File
@@ -139,7 +139,7 @@ void start_thread(struct pt_regs *regs, unsigned int pc, unsigned long usp)
*/
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long ustk_size,
struct task_struct *p, struct pt_regs *unused)
struct task_struct *p)
{
struct pt_regs *childregs;
+1 -2
View File
@@ -94,8 +94,7 @@ asmlinkage void ret_from_fork(void);
asmlinkage void ret_from_kernel_thread(void);
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct *p, struct pt_regs *unused)
unsigned long arg, struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
struct switch_stack *swstack = ((struct switch_stack *)childregs) - 1;
+1 -2
View File
@@ -109,8 +109,7 @@ extern asmlinkage void ret_from_kernel_thread(void);
int
copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct *p, struct pt_regs *unused)
unsigned long arg, struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
struct switch_stack *swstack = ((struct switch_stack *) childregs) - 1;
+1 -1
View File
@@ -144,7 +144,7 @@ inline unsigned long user_stack(const struct pt_regs *regs)
*/
int copy_thread(unsigned long clone_flags,
unsigned long usp, unsigned long arg,
struct task_struct *p, struct pt_regs *unused)
struct task_struct *p)
{
struct pt_regs *childregs;
+1 -1
View File
@@ -129,7 +129,7 @@ void flush_thread(void)
int copy_thread(unsigned long clone_flags,
unsigned long usp, unsigned long topstk,
struct task_struct * p, struct pt_regs *unused)
struct task_struct * p)
{
struct pt_regs * childregs;
+1 -2
View File
@@ -87,8 +87,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
* Copy architecture-specific thread state
*/
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p,
struct pt_regs *unused)
unsigned long arg, struct task_struct *p)
{
struct thread_info *ti = task_thread_info(p);
struct hexagon_switch_stack *ss;
+2 -1
View File
@@ -393,12 +393,13 @@ ia64_load_extra (struct task_struct *task)
int
copy_thread(unsigned long clone_flags,
unsigned long user_stack_base, unsigned long user_stack_size,
struct task_struct *p, struct pt_regs *regs)
struct task_struct *p)
{
extern char ia64_ret_from_clone;
struct switch_stack *child_stack, *stack;
unsigned long rbs, child_rbs, rbs_size;
struct pt_regs *child_ptregs;
struct pt_regs *regs = current_pt_regs();
int retval = 0;
child_ptregs = (struct pt_regs *) ((unsigned long) p + IA64_STK_OFFSET) - 1;
+1 -1
View File
@@ -192,7 +192,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
}
int copy_thread(unsigned long clone_flags, unsigned long spu,
unsigned long arg, struct task_struct *tsk, struct pt_regs *unused)
unsigned long arg, struct task_struct *tsk)
{
struct pt_regs *childregs = task_pt_regs(tsk);
extern void ret_from_fork(void);
+1 -2
View File
@@ -154,8 +154,7 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
}
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct * p, struct pt_regs * unused)
unsigned long arg, struct task_struct *p)
{
struct fork_frame {
struct switch_stack sw;
+1 -2
View File
@@ -120,8 +120,7 @@ void flush_thread(void)
}
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct *p, struct pt_regs *unused)
unsigned long arg, struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
struct thread_info *ti = task_thread_info(p);
+2 -2
View File
@@ -114,10 +114,10 @@ void flush_thread(void)
}
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p, struct pt_regs *regs)
unsigned long arg, struct task_struct *p)
{
struct thread_info *ti = task_thread_info(p);
struct pt_regs *childregs;
struct pt_regs *childregs, *regs = current_pt_regs();
unsigned long childksp;
p->set_child_tid = p->clear_child_tid = NULL;
+1 -1
View File
@@ -206,7 +206,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
*/
int copy_thread(unsigned long clone_flags,
unsigned long c_usp, unsigned long ustk_size,
struct task_struct *p, struct pt_regs *unused)
struct task_struct *p)
{
struct thread_info *ti = task_thread_info(p);
struct pt_regs *c_regs;
+1 -1
View File
@@ -142,7 +142,7 @@ extern asmlinkage void ret_from_fork(void);
int
copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p, struct pt_regs *regs)
unsigned long arg, struct task_struct *p)
{
struct pt_regs *userregs;
struct pt_regs *kregs;
+2 -3
View File
@@ -204,10 +204,9 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r)
int
copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg,
struct task_struct *p, struct pt_regs *unused)
unsigned long arg, struct task_struct *p)
{
struct pt_regs * cregs = &(p->thread.regs);
struct pt_regs *cregs = &(p->thread.regs);
void *stack = task_stack_page(p);
/* We have to use void * instead of a function pointer, because
+2 -2
View File
@@ -733,8 +733,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
extern unsigned long dscr_default; /* defined in arch/powerpc/kernel/sysfs.c */
int copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p,
struct pt_regs *regs)
unsigned long arg, struct task_struct *p)
{
struct pt_regs *childregs, *kregs;
extern void ret_from_fork(void);
@@ -759,6 +758,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
ti->flags |= _TIF_RESTOREALL;
f = ret_from_kernel_thread;
} else {
struct pt_regs *regs = current_pt_regs();
CHECK_FULL_REGS(regs);
*childregs = *regs;
if (usp)

Some files were not shown because too many files have changed in this diff Show More