]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc/kernel/process.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6-omap-h63xx.git] / arch / sparc / kernel / process.c
index 113bd48a89bde9ccd16bce8c7e9c827e117ccb92..33f7a3ddb1046b374a4804dad958e1c6d429b74c 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/user.h>
 #include <linux/a.out.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/pm.h>
@@ -40,6 +39,7 @@
 #include <asm/processor.h>
 #include <asm/psr.h>
 #include <asm/elf.h>
+#include <asm/prom.h>
 #include <asm/unistd.h>
 
 /* 
@@ -151,7 +151,7 @@ void machine_halt(void)
        local_irq_enable();
        mdelay(8);
        local_irq_disable();
-       if (!serial_console && prom_palette)
+       if (prom_palette)
                prom_palette (1);
        prom_halt();
        panic("Halt failed!");
@@ -167,7 +167,7 @@ void machine_restart(char * cmd)
 
        p = strchr (reboot_command, '\n');
        if (p) *p = 0;
-       if (!serial_console && prom_palette)
+       if (prom_palette)
                prom_palette (1);
        if (cmd)
                prom_reboot(cmd);
@@ -180,7 +180,8 @@ void machine_restart(char * cmd)
 void machine_power_off(void)
 {
 #ifdef CONFIG_SUN_AUXIO
-       if (auxio_power_register && (!serial_console || scons_pwroff))
+       if (auxio_power_register &&
+           (strcmp(of_console_device->type, "serial") || scons_pwroff))
                *auxio_power_register |= AUXIO_POWER_OFF;
 #endif
        machine_halt();
@@ -348,7 +349,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 +358,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 +372,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 +381,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 +467,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 +610,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
@@ -684,7 +685,7 @@ out:
  * NOTE! Only a kernel-only process(ie the swapper or direct descendants
  * who haven't done an "execve()") should use this: it will work within
  * a system call from a "real" process, but the process memory space will
- * not be free'd until both the parent and the child have exited.
+ * not be freed until both the parent and the child have exited.
  */
 pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 {