[PATCH] powerpc: task_thread_info()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Al Viro and committed by Linus Torvalds b5e2fc1c ee8c1dd4

+12 -12
+2 -2
arch/powerpc/kernel/process.c
··· 424 if (trap == 0x300 || trap == 0x600) 425 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); 426 printk("TASK = %p[%d] '%s' THREAD: %p", 427 - current, current->pid, current->comm, current->thread_info); 428 429 #ifdef CONFIG_SMP 430 printk(" CPU: %d", smp_processor_id()); ··· 516 #ifdef CONFIG_PPC32 517 childregs->gpr[2] = (unsigned long) p; 518 #else 519 - clear_ti_thread_flag(p->thread_info, TIF_32BIT); 520 #endif 521 p->thread.regs = NULL; /* no user register state */ 522 } else {
··· 424 if (trap == 0x300 || trap == 0x600) 425 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); 426 printk("TASK = %p[%d] '%s' THREAD: %p", 427 + current, current->pid, current->comm, task_thread_info(current)); 428 429 #ifdef CONFIG_SMP 430 printk(" CPU: %d", smp_processor_id()); ··· 516 #ifdef CONFIG_PPC32 517 childregs->gpr[2] = (unsigned long) p; 518 #else 519 + clear_tsk_thread_flag(p, TIF_32BIT); 520 #endif 521 p->thread.regs = NULL; /* no user register state */ 522 } else {
+2 -2
arch/powerpc/kernel/ptrace-common.h
··· 62 struct pt_regs *regs = task->thread.regs; 63 if (regs != NULL) 64 regs->msr |= MSR_SE; 65 - set_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); 66 } 67 68 static inline void clear_single_step(struct task_struct *task) ··· 70 struct pt_regs *regs = task->thread.regs; 71 if (regs != NULL) 72 regs->msr &= ~MSR_SE; 73 - clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); 74 } 75 76 #ifdef CONFIG_ALTIVEC
··· 62 struct pt_regs *regs = task->thread.regs; 63 if (regs != NULL) 64 regs->msr |= MSR_SE; 65 + set_tsk_thread_flag(task, TIF_SINGLESTEP); 66 } 67 68 static inline void clear_single_step(struct task_struct *task) ··· 70 struct pt_regs *regs = task->thread.regs; 71 if (regs != NULL) 72 regs->msr &= ~MSR_SE; 73 + clear_tsk_thread_flag(task, TIF_SINGLESTEP); 74 } 75 76 #ifdef CONFIG_ALTIVEC
+3 -3
arch/powerpc/kernel/smp.c
··· 338 #ifdef CONFIG_PPC64 339 paca[cpu].__current = p; 340 #endif 341 - current_set[cpu] = p->thread_info; 342 - p->thread_info->cpu = cpu; 343 } 344 345 void __init smp_prepare_cpus(unsigned int max_cpus) ··· 375 #ifdef CONFIG_PPC64 376 paca[boot_cpuid].__current = current; 377 #endif 378 - current_set[boot_cpuid] = current->thread_info; 379 } 380 381 #ifdef CONFIG_HOTPLUG_CPU
··· 338 #ifdef CONFIG_PPC64 339 paca[cpu].__current = p; 340 #endif 341 + current_set[cpu] = task_thread_info(p); 342 + task_thread_info(p)->cpu = cpu; 343 } 344 345 void __init smp_prepare_cpus(unsigned int max_cpus) ··· 375 #ifdef CONFIG_PPC64 376 paca[boot_cpuid].__current = current; 377 #endif 378 + current_set[boot_cpuid] = task_thread_info(current); 379 } 380 381 #ifdef CONFIG_HOTPLUG_CPU
+1 -1
arch/powerpc/platforms/cell/smp.c
··· 86 pcpu = get_hard_smp_processor_id(lcpu); 87 88 /* Fixup atomic count: it exited inside IRQ handler. */ 89 - paca[lcpu].__current->thread_info->preempt_count = 0; 90 91 /* 92 * If the RTAS start-cpu token does not exist then presume the
··· 86 pcpu = get_hard_smp_processor_id(lcpu); 87 88 /* Fixup atomic count: it exited inside IRQ handler. */ 89 + task_thread_info(paca[lcpu].__current)->preempt_count = 0; 90 91 /* 92 * If the RTAS start-cpu token does not exist then presume the
+1 -1
arch/powerpc/platforms/pseries/smp.c
··· 282 pcpu = get_hard_smp_processor_id(lcpu); 283 284 /* Fixup atomic count: it exited inside IRQ handler. */ 285 - paca[lcpu].__current->thread_info->preempt_count = 0; 286 287 /* 288 * If the RTAS start-cpu token does not exist then presume the
··· 282 pcpu = get_hard_smp_processor_id(lcpu); 283 284 /* Fixup atomic count: it exited inside IRQ handler. */ 285 + task_thread_info(paca[lcpu].__current)->preempt_count = 0; 286 287 /* 288 * If the RTAS start-cpu token does not exist then presume the
+1 -1
arch/ppc/kernel/process.c
··· 384 if (trap == 0x300 || trap == 0x600) 385 printk("DAR: %08lX, DSISR: %08lX\n", regs->dar, regs->dsisr); 386 printk("TASK = %p[%d] '%s' THREAD: %p\n", 387 - current, current->pid, current->comm, current->thread_info); 388 printk("Last syscall: %ld ", current->thread.last_syscall); 389 390 #ifdef CONFIG_SMP
··· 384 if (trap == 0x300 || trap == 0x600) 385 printk("DAR: %08lX, DSISR: %08lX\n", regs->dar, regs->dsisr); 386 printk("TASK = %p[%d] '%s' THREAD: %p\n", 387 + current, current->pid, current->comm, task_thread_info(current)); 388 printk("Last syscall: %ld ", current->thread.last_syscall); 389 390 #ifdef CONFIG_SMP
+2 -2
arch/ppc/kernel/smp.c
··· 318 p = fork_idle(cpu); 319 if (IS_ERR(p)) 320 panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); 321 - p->thread_info->cpu = cpu; 322 idle_tasks[cpu] = p; 323 } 324 } ··· 369 char buf[32]; 370 int c; 371 372 - secondary_ti = idle_tasks[cpu]->thread_info; 373 mb(); 374 375 /*
··· 318 p = fork_idle(cpu); 319 if (IS_ERR(p)) 320 panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); 321 + task_thread_info(p)->cpu = cpu; 322 idle_tasks[cpu] = p; 323 } 324 } ··· 369 char buf[32]; 370 int c; 371 372 + secondary_ti = task_thread_info(idle_tasks[cpu]); 373 mb(); 374 375 /*