[PATCH] amd64: task_thread_info()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 12 Jan 2006 09:05:38 +0000 (01:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 17:08:51 +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/x86_64/kernel/i387.c
arch/x86_64/kernel/i8259.c
arch/x86_64/kernel/process.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/traps.c
include/asm-x86_64/i387.h

index d9b22b633e390c0739fdd33ba64b121982b8925f..a5d7e16b928ebc62dc9ba26a9215e30da63b9ad4 100644 (file)
@@ -95,7 +95,7 @@ int save_i387(struct _fpstate __user *buf)
        if (!used_math())
                return 0;
        clear_used_math(); /* trigger finit */
-       if (tsk->thread_info->status & TS_USEDFPU) {
+       if (task_thread_info(tsk)->status & TS_USEDFPU) {
                err = save_i387_checking((struct i387_fxsave_struct __user *)buf);
                if (err) return err;
                stts();
index b61965f0fb34e8d3e2796d260bc3d39876d7cb84..5ecd34ab8c2bba9ae70d15ff9803ead2957c72d9 100644 (file)
@@ -133,7 +133,7 @@ static void end_8259A_irq (unsigned int irq)
 {
        if (irq > 256) { 
                char var;
-               printk("return %p stack %p ti %p\n", __builtin_return_address(0), &var, current->thread_info); 
+               printk("return %p stack %p ti %p\n", __builtin_return_address(0), &var, task_thread_info(current));
 
                BUG(); 
        }
index 669cf0ed32661ced790f71fd15bcb4de49795c42..2ea4acd47fc2fef7cb0614d014506cf4869b09fa 100644 (file)
@@ -463,7 +463,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
        p->thread.rsp0 = (unsigned long) (childregs+1);
        p->thread.userrsp = me->thread.userrsp; 
 
-       set_ti_thread_flag(p->thread_info, TIF_FORK);
+       set_tsk_thread_flag(p, TIF_FORK);
 
        p->thread.fs = me->thread.fs;
        p->thread.gs = me->thread.gs;
index c9e941ae50192cae78e18f8a912ce93d5abcb0f3..d16a2fae270a6db3ed41bd1c360af6875ae6d57c 100644 (file)
@@ -814,7 +814,7 @@ do_rest:
        init_rsp = c_idle.idle->thread.rsp;
        per_cpu(init_tss,cpu).rsp0 = init_rsp;
        initial_code = start_secondary;
-       clear_ti_thread_flag(c_idle.idle->thread_info, TIF_FORK);
+       clear_tsk_thread_flag(c_idle.idle, TIF_FORK);
 
        printk(KERN_INFO "Booting processor %d/%d APIC 0x%x\n", cpu,
                cpus_weight(cpu_present_map),
index 2671fd46ea8568f3db7944e5f89a91f2e1eff0a5..d8f90b48aec4d6051f39e4e35a08b49a95393ab1 100644 (file)
@@ -308,7 +308,7 @@ void show_registers(struct pt_regs *regs)
        printk("CPU %d ", cpu);
        __show_regs(regs);
        printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
-               cur->comm, cur->pid, cur->thread_info, cur);
+               cur->comm, cur->pid, task_thread_info(cur), cur);
 
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -912,7 +912,7 @@ asmlinkage void math_state_restore(void)
        if (!used_math())
                init_fpu(me);
        restore_fpu_checking(&me->thread.i387.fxsave);
-       me->thread_info->status |= TS_USEDFPU;
+       task_thread_info(me)->status |= TS_USEDFPU;
 }
 
 void __init trap_init(void)
index 57f7e14338492df5c8c1b37f54658d6f61894afd..876eb9a2fe7868a7c7ce01ef694403b3150f4601 100644 (file)
@@ -30,7 +30,7 @@ extern int save_i387(struct _fpstate __user *buf);
  */
 
 #define unlazy_fpu(tsk) do { \
-       if ((tsk)->thread_info->status & TS_USEDFPU) \
+       if (task_thread_info(tsk)->status & TS_USEDFPU) \
                save_init_fpu(tsk); \
 } while (0)
 
@@ -46,9 +46,9 @@ static inline void tolerant_fwait(void)
 }
 
 #define clear_fpu(tsk) do { \
-       if ((tsk)->thread_info->status & TS_USEDFPU) {          \
+       if (task_thread_info(tsk)->status & TS_USEDFPU) {       \
                tolerant_fwait();                               \
-               (tsk)->thread_info->status &= ~TS_USEDFPU;      \
+               task_thread_info(tsk)->status &= ~TS_USEDFPU;   \
                stts();                                         \
        }                                                       \
 } while (0)
@@ -170,10 +170,10 @@ static inline void kernel_fpu_end(void)
        preempt_enable();
 }
 
-static inline void save_init_fpu( struct task_struct *tsk )
+static inline void save_init_fpu(struct task_struct *tsk)
 {
        __fxsave_clear(tsk);
-       tsk->thread_info->status &= ~TS_USEDFPU;
+       task_thread_info(tsk)->status &= ~TS_USEDFPU;
        stts();
 }