Skip to content

Commit d562ef6

Browse files
Al ViroLinus Torvalds
authored andcommitted
[PATCH] sparc: 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>
1 parent 308a792 commit d562ef6

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎arch/sparc/kernel/process.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ EXPORT_SYMBOL(dump_stack);
337337
*/
338338
unsigned long thread_saved_pc(struct task_struct *tsk)
339339
{
340-
return tsk->thread_info->kpc;
340+
return task_thread_info(tsk)->kpc;
341341
}
342342

343343
/*
@@ -724,7 +724,7 @@ unsigned long get_wchan(struct task_struct *task)
724724
task->state == TASK_RUNNING)
725725
goto out;
726726

727-
fp = task->thread_info->ksp + bias;
727+
fp = task_thread_info(task)->ksp + bias;
728728
do {
729729
/* Bogus frame pointer? */
730730
if (fp < (task_base + sizeof(struct thread_info)) ||

‎arch/sparc/kernel/ptrace.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static inline void read_sunos_user(struct pt_regs *regs, unsigned long offset,
7575
struct task_struct *tsk, long __user *addr)
7676
{
7777
struct pt_regs *cregs = tsk->thread.kregs;
78-
struct thread_info *t = tsk->thread_info;
78+
struct thread_info *t = task_thread_info(tsk);
7979
int v;
8080

8181
if(offset >= 1024)
@@ -170,7 +170,7 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset,
170170
struct task_struct *tsk)
171171
{
172172
struct pt_regs *cregs = tsk->thread.kregs;
173-
struct thread_info *t = tsk->thread_info;
173+
struct thread_info *t = task_thread_info(tsk);
174174
unsigned long value = regs->u_regs[UREG_I3];
175175

176176
if(offset >= 1024)

‎arch/sparc/kernel/sun4d_smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void __init smp4d_boot_cpus(void)
200200
/* Cook up an idler for this guy. */
201201
p = fork_idle(i);
202202
cpucount++;
203-
current_set[i] = p->thread_info;
203+
current_set[i] = task_thread_info(p);
204204
for (no = 0; !cpu_find_by_instance(no, NULL, &mid)
205205
&& mid != i; no++) ;
206206

‎arch/sparc/kernel/sun4m_smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void __init smp4m_boot_cpus(void)
173173
/* Cook up an idler for this guy. */
174174
p = fork_idle(i);
175175
cpucount++;
176-
current_set[i] = p->thread_info;
176+
current_set[i] = task_thread_info(p);
177177
/* See trampoline.S for details... */
178178
entry += ((i-1) * 3);
179179

‎arch/sparc/kernel/traps.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
291291
#ifndef CONFIG_SMP
292292
if(!fpt) {
293293
#else
294-
if(!(fpt->thread_info->flags & _TIF_USEDFPU)) {
294+
if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
295295
#endif
296296
fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
297297
regs->psr &= ~PSR_EF;
@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
334334
/* nope, better SIGFPE the offending process... */
335335

336336
#ifdef CONFIG_SMP
337-
fpt->thread_info->flags &= ~_TIF_USEDFPU;
337+
task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
338338
#endif
339339
if(psr & PSR_PS) {
340340
/* The first fsr store/load we tried trapped,

‎include/asm-sparc/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
155155
"here:\n" \
156156
: "=&r" (last) \
157157
: "r" (&(current_set[hard_smp_processor_id()])), \
158-
"r" ((next)->thread_info), \
158+
"r" (task_thread_info(next)), \
159159
"i" (TI_KPSR), \
160160
"i" (TI_KSP), \
161161
"i" (TI_TASK) \

0 commit comments

Comments
 (0)