aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/avr32/kernel/process.c6
-rw-r--r--arch/avr32/kernel/ptrace.c2
-rw-r--r--arch/blackfin/kernel/asm-offsets.c2
-rw-r--r--arch/i386/kernel/traps.c2
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c2
-rw-r--r--arch/mips/kernel/smtc.c2
-rw-r--r--arch/x86_64/kernel/irq.c2
-rw-r--r--include/asm-i386/thread_info.h2
-rw-r--r--include/asm-ia64/thread_info.h2
-rw-r--r--include/asm-mips/system.h2
-rw-r--r--include/asm-parisc/compat.h2
-rw-r--r--include/asm-x86_64/thread_info.h2
-rw-r--r--kernel/mutex.c8
13 files changed, 18 insertions, 18 deletions
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 4e4181ed1c6d..13f988402613 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -330,13 +330,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
330{ 330{
331 struct pt_regs *childregs; 331 struct pt_regs *childregs;
332 332
333 childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)p->thread_info)) - 1; 333 childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)task_stack_page(p))) - 1;
334 *childregs = *regs; 334 *childregs = *regs;
335 335
336 if (user_mode(regs)) 336 if (user_mode(regs))
337 childregs->sp = usp; 337 childregs->sp = usp;
338 else 338 else
339 childregs->sp = (unsigned long)p->thread_info + THREAD_SIZE; 339 childregs->sp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
340 340
341 childregs->r12 = 0; /* Set return value for child */ 341 childregs->r12 = 0; /* Set return value for child */
342 342
@@ -403,7 +403,7 @@ unsigned long get_wchan(struct task_struct *p)
403 if (!p || p == current || p->state == TASK_RUNNING) 403 if (!p || p == current || p->state == TASK_RUNNING)
404 return 0; 404 return 0;
405 405
406 stack_page = (unsigned long)p->thread_info; 406 stack_page = (unsigned long)task_stack_page(p);
407 BUG_ON(!stack_page); 407 BUG_ON(!stack_page);
408 408
409 /* 409 /*
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c
index 8ac74dddbbde..3c36c2d16148 100644
--- a/arch/avr32/kernel/ptrace.c
+++ b/arch/avr32/kernel/ptrace.c
@@ -24,7 +24,7 @@
24 24
25static struct pt_regs *get_user_regs(struct task_struct *tsk) 25static struct pt_regs *get_user_regs(struct task_struct *tsk)
26{ 26{
27 return (struct pt_regs *)((unsigned long) tsk->thread_info + 27 return (struct pt_regs *)((unsigned long)task_stack_page(tsk) +
28 THREAD_SIZE - sizeof(struct pt_regs)); 28 THREAD_SIZE - sizeof(struct pt_regs));
29} 29}
30 30
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c
index 41d9a9f89700..e455f4504509 100644
--- a/arch/blackfin/kernel/asm-offsets.c
+++ b/arch/blackfin/kernel/asm-offsets.c
@@ -46,7 +46,7 @@ int main(void)
46 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); 46 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
47 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); 47 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
48 DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); 48 DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
49 DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info)); 49 DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
50 DEFINE(TASK_MM, offsetof(struct task_struct, mm)); 50 DEFINE(TASK_MM, offsetof(struct task_struct, mm));
51 DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); 51 DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
52 DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); 52 DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending));
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 4bec0cbf407a..c05e7e861b29 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -305,7 +305,7 @@ void show_registers(struct pt_regs *regs)
305 regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss); 305 regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss);
306 printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", 306 printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)",
307 TASK_COMM_LEN, current->comm, current->pid, 307 TASK_COMM_LEN, current->comm, current->pid,
308 current_thread_info(), current, current->thread_info); 308 current_thread_info(), current, task_thread_info(current));
309 /* 309 /*
310 * When in-kernel, we also print out the stack and code at the 310 * When in-kernel, we also print out the stack and code at the
311 * time of the fault.. 311 * time of the fault..
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index b988c7bdc6e4..7cd183d346ef 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -31,7 +31,7 @@ int main(void)
31 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); 31 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
32 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); 32 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
33 DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); 33 DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
34 DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info)); 34 DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
35 DEFINE(TASK_MM, offsetof(struct task_struct, mm)); 35 DEFINE(TASK_MM, offsetof(struct task_struct, mm));
36 DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); 36 DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
37 37
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 5dcfab6b288e..b361edb83dc6 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -560,7 +560,7 @@ void smtc_boot_secondary(int cpu, struct task_struct *idle)
560 write_tc_gpr_sp(__KSTK_TOS(idle)); 560 write_tc_gpr_sp(__KSTK_TOS(idle));
561 561
562 /* global pointer */ 562 /* global pointer */
563 write_tc_gpr_gp((unsigned long)idle->thread_info); 563 write_tc_gpr_gp((unsigned long)task_thread_info(idle));
564 564
565 smtc_status |= SMTC_MTC_ACTIVE; 565 smtc_status |= SMTC_MTC_ACTIVE;
566 write_tc_c0_tchalt(0); 566 write_tc_c0_tchalt(0);
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 3bc30d2c13d3..3eaceac32481 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -32,7 +32,7 @@ atomic_t irq_err_count;
32 */ 32 */
33static inline void stack_overflow_check(struct pt_regs *regs) 33static inline void stack_overflow_check(struct pt_regs *regs)
34{ 34{
35 u64 curbase = (u64) current->thread_info; 35 u64 curbase = (u64)task_stack_page(current);
36 static unsigned long warned = -60*HZ; 36 static unsigned long warned = -60*HZ;
37 37
38 if (regs->rsp >= curbase && regs->rsp <= curbase + THREAD_SIZE && 38 if (regs->rsp >= curbase && regs->rsp <= curbase + THREAD_SIZE &&
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
index bf01d4b342bd..4cb0f91ae64f 100644
--- a/include/asm-i386/thread_info.h
+++ b/include/asm-i386/thread_info.h
@@ -172,7 +172,7 @@ static inline struct thread_info *current_thread_info(void)
172#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ 172#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */
173#define TS_POLLING 0x0002 /* True if in idle loop and not sleeping */ 173#define TS_POLLING 0x0002 /* True if in idle loop and not sleeping */
174 174
175#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) 175#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
176 176
177#endif /* __KERNEL__ */ 177#endif /* __KERNEL__ */
178 178
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 91698599f918..d28147506585 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -110,6 +110,6 @@ struct thread_info {
110 110
111#define TS_POLLING 1 /* true if in idle loop and not sleeping */ 111#define TS_POLLING 1 /* true if in idle loop and not sleeping */
112 112
113#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) 113#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
114 114
115#endif /* _ASM_IA64_THREAD_INFO_H */ 115#endif /* _ASM_IA64_THREAD_INFO_H */
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index 30f23a2b46ca..3713d256d369 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -55,7 +55,7 @@ do { \
55 if (cpu_has_dsp) \ 55 if (cpu_has_dsp) \
56 __save_dsp(prev); \ 56 __save_dsp(prev); \
57 next->thread.emulated_fp = 0; \ 57 next->thread.emulated_fp = 0; \
58 (last) = resume(prev, next, next->thread_info); \ 58 (last) = resume(prev, next, task_thread_info(next)); \
59 if (cpu_has_dsp) \ 59 if (cpu_has_dsp) \
60 __restore_dsp(current); \ 60 __restore_dsp(current); \
61} while(0) 61} while(0)
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h
index fe8579023531..11f4222597a0 100644
--- a/include/asm-parisc/compat.h
+++ b/include/asm-parisc/compat.h
@@ -152,7 +152,7 @@ static __inline__ void __user *compat_alloc_user_space(long len)
152 152
153static inline int __is_compat_task(struct task_struct *t) 153static inline int __is_compat_task(struct task_struct *t)
154{ 154{
155 return test_ti_thread_flag(t->thread_info, TIF_32BIT); 155 return test_ti_thread_flag(task_thread_info(t), TIF_32BIT);
156} 156}
157 157
158static inline int is_compat_task(void) 158static inline int is_compat_task(void)
diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h
index 74a6c74397f7..10bb5a8ed688 100644
--- a/include/asm-x86_64/thread_info.h
+++ b/include/asm-x86_64/thread_info.h
@@ -162,7 +162,7 @@ static inline struct thread_info *stack_thread_info(void)
162#define TS_COMPAT 0x0002 /* 32bit syscall active */ 162#define TS_COMPAT 0x0002 /* 32bit syscall active */
163#define TS_POLLING 0x0004 /* true if in idle loop and not sleeping */ 163#define TS_POLLING 0x0004 /* true if in idle loop and not sleeping */
164 164
165#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) 165#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
166 166
167#endif /* __KERNEL__ */ 167#endif /* __KERNEL__ */
168 168
diff --git a/kernel/mutex.c b/kernel/mutex.c
index e7cbbb82765b..303eab18484b 100644
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -133,7 +133,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass)
133 133
134 debug_mutex_lock_common(lock, &waiter); 134 debug_mutex_lock_common(lock, &waiter);
135 mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_); 135 mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
136 debug_mutex_add_waiter(lock, &waiter, task->thread_info); 136 debug_mutex_add_waiter(lock, &waiter, task_thread_info(task));
137 137
138 /* add waiting tasks to the end of the waitqueue (FIFO): */ 138 /* add waiting tasks to the end of the waitqueue (FIFO): */
139 list_add_tail(&waiter.list, &lock->wait_list); 139 list_add_tail(&waiter.list, &lock->wait_list);
@@ -159,7 +159,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass)
159 */ 159 */
160 if (unlikely(state == TASK_INTERRUPTIBLE && 160 if (unlikely(state == TASK_INTERRUPTIBLE &&
161 signal_pending(task))) { 161 signal_pending(task))) {
162 mutex_remove_waiter(lock, &waiter, task->thread_info); 162 mutex_remove_waiter(lock, &waiter, task_thread_info(task));
163 mutex_release(&lock->dep_map, 1, _RET_IP_); 163 mutex_release(&lock->dep_map, 1, _RET_IP_);
164 spin_unlock_mutex(&lock->wait_lock, flags); 164 spin_unlock_mutex(&lock->wait_lock, flags);
165 165
@@ -175,8 +175,8 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass)
175 } 175 }
176 176
177 /* got the lock - rejoice! */ 177 /* got the lock - rejoice! */
178 mutex_remove_waiter(lock, &waiter, task->thread_info); 178 mutex_remove_waiter(lock, &waiter, task_thread_info(task));
179 debug_mutex_set_owner(lock, task->thread_info); 179 debug_mutex_set_owner(lock, task_thread_info(task));
180 180
181 /* set it to 0 if there are no waiters left: */ 181 /* set it to 0 if there are no waiters left: */
182 if (likely(list_empty(&lock->wait_list))) 182 if (likely(list_empty(&lock->wait_list)))