X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsparc%2Fkernel%2Ftraps.c;h=e246a333789fdd41ae282ab51f3f4a29a6c15d2a;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=ceb4a8f29abd7d3e2dee6d550431a04213f88560;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index ceb4a8f29..e246a3337 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c @@ -9,7 +9,6 @@ * I hate traps on the sparc, grrr... */ -#include #include /* for jiffies */ #include #include @@ -100,7 +99,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) " /_| \\__/ |_\\\n" " \\__U_/\n"); - printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); + printk("%s(%d[#%u]): %s [#%d]\n", current->comm, + current->pid, current->xid, str, ++die_counter); show_regs(regs); __SAVE; __SAVE; __SAVE; __SAVE; @@ -246,17 +246,17 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc, &fptask->thread.fpqueue[0], &fptask->thread.fpqdepth); } last_task_used_math = current; - if(current->used_math) { + if(used_math()) { fpload(¤t->thread.float_regs[0], ¤t->thread.fsr); } else { /* Set initial sane state. */ fpload(&init_fregs[0], &init_fsr); - current->used_math = 1; + set_used_math(); } #else - if(!current->used_math) { + if(!used_math()) { fpload(&init_fregs[0], &init_fsr); - current->used_math = 1; + set_used_math(); } else { fpload(¤t->thread.float_regs[0], ¤t->thread.fsr); } @@ -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,