Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[sfrench/cifs-2.6.git] / arch / sparc / kernel / process.c
index 118cac84a0f5445ab9a57a831321706946e004c4..fc874e63a499818e5f32ff6517d1df361b6a1f3a 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/slab.h>
 #include <linux/user.h>
 #include <linux/a.out.h>
-#include <linux/config.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/reboot.h>
@@ -55,6 +54,7 @@ void (*pm_idle)(void);
  * handler when auxio is not present-- unused for now...
  */
 void (*pm_power_off)(void) = machine_power_off;
+EXPORT_SYMBOL(pm_power_off);
 
 /*
  * sysctl - toggle power-off restriction for serial console 
@@ -348,7 +348,7 @@ void exit_thread(void)
 #ifndef CONFIG_SMP
        if(last_task_used_math == current) {
 #else
-       if(current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
 #endif
                /* Keep process from leaving FPU in a bogon state. */
                put_psr(get_psr() | PSR_EF);
@@ -357,7 +357,7 @@ void exit_thread(void)
 #ifndef CONFIG_SMP
                last_task_used_math = NULL;
 #else
-               current_thread_info()->flags &= ~_TIF_USEDFPU;
+               clear_thread_flag(TIF_USEDFPU);
 #endif
        }
 }
@@ -371,7 +371,7 @@ void flush_thread(void)
 #ifndef CONFIG_SMP
        if(last_task_used_math == current) {
 #else
-       if(current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
 #endif
                /* Clean the fpu. */
                put_psr(get_psr() | PSR_EF);
@@ -380,7 +380,7 @@ void flush_thread(void)
 #ifndef CONFIG_SMP
                last_task_used_math = NULL;
 #else
-               current_thread_info()->flags &= ~_TIF_USEDFPU;
+               clear_thread_flag(TIF_USEDFPU);
 #endif
        }
 
@@ -466,13 +466,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
 #ifndef CONFIG_SMP
        if(last_task_used_math == current) {
 #else
-       if(current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
 #endif
                put_psr(get_psr() | PSR_EF);
                fpsave(&p->thread.float_regs[0], &p->thread.fsr,
                       &p->thread.fpqueue[0], &p->thread.fpqdepth);
 #ifdef CONFIG_SMP
-               current_thread_info()->flags &= ~_TIF_USEDFPU;
+               clear_thread_flag(TIF_USEDFPU);
 #endif
        }
 
@@ -609,13 +609,13 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
                return 1;
        }
 #ifdef CONFIG_SMP
-       if (current_thread_info()->flags & _TIF_USEDFPU) {
+       if (test_thread_flag(TIF_USEDFPU)) {
                put_psr(get_psr() | PSR_EF);
                fpsave(&current->thread.float_regs[0], &current->thread.fsr,
                       &current->thread.fpqueue[0], &current->thread.fpqdepth);
                if (regs != NULL) {
                        regs->psr &= ~(PSR_EF);
-                       current_thread_info()->flags &= ~(_TIF_USEDFPU);
+                       clear_thread_flag(TIF_USEDFPU);
                }
        }
 #else