[PATCH] sparc: task_thread_info()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 12 Jan 2006 09:05:46 +0000 (01:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 17:08:53 +0000 (09:08 -0800)
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>
arch/sparc/kernel/process.c
arch/sparc/kernel/ptrace.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/sparc/kernel/traps.c
include/asm-sparc/system.h

index ea86474114627f267d739def93a6c33d2b4c9c4d..7eebb08a953a4da18503393a67ac4daa2da44650 100644 (file)
@@ -337,7 +337,7 @@ EXPORT_SYMBOL(dump_stack);
  */
 unsigned long thread_saved_pc(struct task_struct *tsk)
 {
-       return tsk->thread_info->kpc;
+       return task_thread_info(tsk)->kpc;
 }
 
 /*
@@ -724,7 +724,7 @@ unsigned long get_wchan(struct task_struct *task)
             task->state == TASK_RUNNING)
                goto out;
 
-       fp = task->thread_info->ksp + bias;
+       fp = task_thread_info(task)->ksp + bias;
        do {
                /* Bogus frame pointer? */
                if (fp < (task_base + sizeof(struct thread_info)) ||
index fc470c0e9dc6bd453ce6b14143610d70225622d5..1baf13ed5c3a6b6e7186c022e69108ec6d490c46 100644 (file)
@@ -75,7 +75,7 @@ static inline void read_sunos_user(struct pt_regs *regs, unsigned long offset,
                                   struct task_struct *tsk, long __user *addr)
 {
        struct pt_regs *cregs = tsk->thread.kregs;
-       struct thread_info *t = tsk->thread_info;
+       struct thread_info *t = task_thread_info(tsk);
        int v;
        
        if(offset >= 1024)
@@ -170,7 +170,7 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset,
                                    struct task_struct *tsk)
 {
        struct pt_regs *cregs = tsk->thread.kregs;
-       struct thread_info *t = tsk->thread_info;
+       struct thread_info *t = task_thread_info(tsk);
        unsigned long value = regs->u_regs[UREG_I3];
 
        if(offset >= 1024)
index cc1fc898495c899b4d39a66be014db5dce428191..40d426cce8244f16969e3a12f876855f0893bd0f 100644 (file)
@@ -200,7 +200,7 @@ void __init smp4d_boot_cpus(void)
                        /* Cook up an idler for this guy. */
                        p = fork_idle(i);
                        cpucount++;
-                       current_set[i] = p->thread_info;
+                       current_set[i] = task_thread_info(p);
                        for (no = 0; !cpu_find_by_instance(no, NULL, &mid)
                                     && mid != i; no++) ;
 
index f113422a372761dabce56f5624f0b2835c9e4a08..a21f27d10e55737881f81522262b4e07751476e9 100644 (file)
@@ -173,7 +173,7 @@ void __init smp4m_boot_cpus(void)
                        /* Cook up an idler for this guy. */
                        p = fork_idle(i);
                        cpucount++;
-                       current_set[i] = p->thread_info;
+                       current_set[i] = task_thread_info(p);
                        /* See trampoline.S for details... */
                        entry += ((i-1) * 3);
 
index 3f451ae664826b827ecd36027d543df74399fa1f..41d45c298fb2426d64a5b293857a4706d880a461 100644 (file)
@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
 #ifndef CONFIG_SMP
        if(!fpt) {
 #else
-        if(!(fpt->thread_info->flags & _TIF_USEDFPU)) {
+        if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
 #endif
                fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
                regs->psr &= ~PSR_EF;
@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
        /* nope, better SIGFPE the offending process... */
               
 #ifdef CONFIG_SMP
-       fpt->thread_info->flags &= ~_TIF_USEDFPU;
+       task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
 #endif
        if(psr & PSR_PS) {
                /* The first fsr store/load we tried trapped,
index 52fe2e464e15eead28e27f9dc0b055c013389448..58dd162927bbdd076ff1f6c11a80fadcdb68b324 100644 (file)
@@ -155,7 +155,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
        "here:\n"                                                                       \
         : "=&r" (last)                                                                 \
         : "r" (&(current_set[hard_smp_processor_id()])),       \
-         "r" ((next)->thread_info),                            \
+         "r" (task_thread_info(next)),                         \
          "i" (TI_KPSR),                                        \
          "i" (TI_KSP),                                         \
          "i" (TI_TASK)                                         \