]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: Move over and enable FPU support for SH-5.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 19 Nov 2007 10:13:38 +0000 (19:13 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jan 2008 04:18:48 +0000 (13:18 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/Kconfig.sh64
arch/sh/kernel/cpu/sh5/Makefile
arch/sh/kernel/cpu/sh5/fpu.c [moved from arch/sh64/kernel/fpu.c with 99% similarity]
arch/sh/kernel/process_64.c
arch/sh/kernel/signal_64.c

index 10f5d30d31841f58dcfd8532ef1f159145d4c8ce..e37cd8c51e34b42283eaace93af8690ba0078081 100644 (file)
@@ -83,6 +83,7 @@ choice
 
 config CPU_SH5
        bool "SH-5"
+       select CPU_HAS_FPU
 
 endchoice
 
index 7ea10732b5cc69949401c55d87c278b2e26965aa..6d388e8d8991a72dffe3f6fbfbe57e1e9900965d 100644 (file)
@@ -1,3 +1,4 @@
 obj-y := entry.o switchto.o
 
 obj-$(CONFIG_KALLSYMS)         += unwind.o
+obj-$(CONFIG_SH_FPU)           += fpu.o
similarity index 99%
rename from arch/sh64/kernel/fpu.c
rename to arch/sh/kernel/cpu/sh5/fpu.c
index 8ad4ed6a6c9b437b9d6658803e7b865099ea9cb5..d3f5e7468dfe3f227359b58a7ea955d1c511b7ec 100644 (file)
@@ -152,7 +152,7 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
        if (last_task_used_math == current)
                return;
 
-       grab_fpu();
+       enable_fpu();
        if (last_task_used_math != NULL) {
                /* Other processes fpu state, save away */
                fpsave(&last_task_used_math->thread.fpu.hard);
@@ -165,6 +165,6 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
                fpload(&init_fpuregs.hard);
                 set_used_math();
         }
-       release_fpu();
+       disable_fpu();
 }
 
index 0761af4d2a424a77a7409e90800bd98560bcde52..0c2bc61b66b3dec9a9e52e1241f82dbcbb385b40 100644 (file)
@@ -469,9 +469,9 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
        fpvalid = !!tsk_used_math(tsk);
        if (fpvalid) {
                if (current == last_task_used_math) {
-                       grab_fpu();
+                       enable_fpu();
                        fpsave(&tsk->thread.fpu.hard);
-                       release_fpu();
+                       disable_fpu();
                        last_task_used_math = 0;
                        regs->sr |= SR_FD;
                }
@@ -496,9 +496,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
 
 #ifdef CONFIG_SH_FPU
        if(last_task_used_math == current) {
-               grab_fpu();
+               enable_fpu();
                fpsave(&current->thread.fpu.hard);
-               release_fpu();
+               disable_fpu();
                last_task_used_math = NULL;
                regs->sr |= SR_FD;
        }
index 069fb60836465feeacfe49d28b0624a3c9010305..08f403e236622ac95c718122e9db07e813c5a90e 100644 (file)
@@ -211,9 +211,9 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
                return err;
 
        if (current == last_task_used_math) {
-               grab_fpu();
+               enable_fpu();
                fpsave(&current->thread.fpu.hard);
-               release_fpu();
+               disable_fpu();
                last_task_used_math = NULL;
                regs->sr |= SR_FD;
        }