]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc/kernel/traps.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / arch / sparc / kernel / traps.c
index 41d45c298fb2426d64a5b293857a4706d880a461..978e9d85949eeab9424d654fc44795bc8445e6eb 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: traps.c,v 1.64 2000/09/03 15:00:49 anton Exp $
+/*
  * arch/sparc/kernel/traps.c
  *
  * Copyright 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -9,13 +9,13 @@
  * I hate traps on the sparc, grrr...
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>  /* for jiffies */
 #include <linux/kernel.h>
 #include <linux/kallsyms.h>
 #include <linux/signal.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/kdebug.h>
 
 #include <asm/delay.h>
 #include <asm/system.h>
@@ -23,7 +23,6 @@
 #include <asm/oplib.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/kdebug.h>
 #include <asm/unistd.h>
 #include <asm/traps.h>
 
@@ -39,7 +38,7 @@ struct trap_trace_entry trapbuf[1024];
 
 void syscall_trace_entry(struct pt_regs *regs)
 {
-       printk("%s[%d]: ", current->comm, current->pid);
+       printk("%s[%d]: ", current->comm, task_pid_nr(current));
        printk("scall<%d> (could be %d)\n", (int) regs->u_regs[UREG_G1],
               (int) regs->u_regs[UREG_I0]);
 }
@@ -100,8 +99,9 @@ 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): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter);
        show_regs(regs);
+       add_taint(TAINT_DIE);
 
        __SAVE; __SAVE; __SAVE; __SAVE;
        __SAVE; __SAVE; __SAVE; __SAVE;
@@ -260,7 +260,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
        } else {
                fpload(&current->thread.float_regs[0], &current->thread.fsr);
        }
-       current_thread_info()->flags |= _TIF_USEDFPU;
+       set_thread_flag(TIF_USEDFPU);
 #endif
 }
 
@@ -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(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
+       if (!test_tsk_thread_flag(fpt, 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
-       task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
+       clear_tsk_thread_flag(fpt, TIF_USEDFPU);
 #endif
        if(psr & PSR_PS) {
                /* The first fsr store/load we tried trapped,