Commit d562ef6a authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] sparc: task_thread_info()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 308a792f
...@@ -337,7 +337,7 @@ EXPORT_SYMBOL(dump_stack); ...@@ -337,7 +337,7 @@ EXPORT_SYMBOL(dump_stack);
*/ */
unsigned long thread_saved_pc(struct task_struct *tsk) 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) ...@@ -724,7 +724,7 @@ unsigned long get_wchan(struct task_struct *task)
task->state == TASK_RUNNING) task->state == TASK_RUNNING)
goto out; goto out;
fp = task->thread_info->ksp + bias; fp = task_thread_info(task)->ksp + bias;
do { do {
/* Bogus frame pointer? */ /* Bogus frame pointer? */
if (fp < (task_base + sizeof(struct thread_info)) || if (fp < (task_base + sizeof(struct thread_info)) ||
......
...@@ -75,7 +75,7 @@ static inline void read_sunos_user(struct pt_regs *regs, unsigned long offset, ...@@ -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 task_struct *tsk, long __user *addr)
{ {
struct pt_regs *cregs = tsk->thread.kregs; struct pt_regs *cregs = tsk->thread.kregs;
struct thread_info *t = tsk->thread_info; struct thread_info *t = task_thread_info(tsk);
int v; int v;
if(offset >= 1024) if(offset >= 1024)
...@@ -170,7 +170,7 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset, ...@@ -170,7 +170,7 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset,
struct task_struct *tsk) struct task_struct *tsk)
{ {
struct pt_regs *cregs = tsk->thread.kregs; 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]; unsigned long value = regs->u_regs[UREG_I3];
if(offset >= 1024) if(offset >= 1024)
......
...@@ -200,7 +200,7 @@ void __init smp4d_boot_cpus(void) ...@@ -200,7 +200,7 @@ void __init smp4d_boot_cpus(void)
/* Cook up an idler for this guy. */ /* Cook up an idler for this guy. */
p = fork_idle(i); p = fork_idle(i);
cpucount++; cpucount++;
current_set[i] = p->thread_info; current_set[i] = task_thread_info(p);
for (no = 0; !cpu_find_by_instance(no, NULL, &mid) for (no = 0; !cpu_find_by_instance(no, NULL, &mid)
&& mid != i; no++) ; && mid != i; no++) ;
......
...@@ -173,7 +173,7 @@ void __init smp4m_boot_cpus(void) ...@@ -173,7 +173,7 @@ void __init smp4m_boot_cpus(void)
/* Cook up an idler for this guy. */ /* Cook up an idler for this guy. */
p = fork_idle(i); p = fork_idle(i);
cpucount++; cpucount++;
current_set[i] = p->thread_info; current_set[i] = task_thread_info(p);
/* See trampoline.S for details... */ /* See trampoline.S for details... */
entry += ((i-1) * 3); entry += ((i-1) * 3);
......
...@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc, ...@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
if(!fpt) { if(!fpt) {
#else #else
if(!(fpt->thread_info->flags & _TIF_USEDFPU)) { if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
#endif #endif
fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth); fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
regs->psr &= ~PSR_EF; regs->psr &= ~PSR_EF;
...@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc, ...@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
/* nope, better SIGFPE the offending process... */ /* nope, better SIGFPE the offending process... */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
fpt->thread_info->flags &= ~_TIF_USEDFPU; task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
#endif #endif
if(psr & PSR_PS) { if(psr & PSR_PS) {
/* The first fsr store/load we tried trapped, /* The first fsr store/load we tried trapped,
......
...@@ -155,7 +155,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr, ...@@ -155,7 +155,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
"here:\n" \ "here:\n" \
: "=&r" (last) \ : "=&r" (last) \
: "r" (&(current_set[hard_smp_processor_id()])), \ : "r" (&(current_set[hard_smp_processor_id()])), \
"r" ((next)->thread_info), \ "r" (task_thread_info(next)), \
"i" (TI_KPSR), \ "i" (TI_KPSR), \
"i" (TI_KSP), \ "i" (TI_KSP), \
"i" (TI_TASK) \ "i" (TI_TASK) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment