]> err.no Git - linux-2.6/blobdiff - arch/ppc64/kernel/signal.c
[PATCH] powerpc: Fix handling of fpscr on 64-bit
[linux-2.6] / arch / ppc64 / kernel / signal.c
index 49a79a55c32de7d5ab73191dbe78047a6dcf848e..ec9d0984b6a09118f89abeb7f95675247c293f9f 100644 (file)
@@ -133,7 +133,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
        flush_fp_to_thread(current);
 
        /* Make sure signal doesn't get spurrious FP exceptions */
-       current->thread.fpscr = 0;
+       current->thread.fpscr.val = 0;
 
 #ifdef CONFIG_ALTIVEC
        err |= __put_user(v_regs, &sc->v_regs);
@@ -550,6 +550,15 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
                /* Whee!  Actually deliver the signal.  */
                if (TRAP(regs) == 0x0C00)
                        syscall_restart(regs, &ka);
+
+               /*
+                * Reenable the DABR before delivering the signal to
+                * user space. The DABR will have been cleared if it
+                * triggered inside the kernel.
+                */
+               if (current->thread.dabr)
+                       set_dabr(current->thread.dabr);
+
                return handle_signal(signr, &ka, &info, oldset, regs);
        }