Revert "DROP! Revert "ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn...
Yogish Kulkarni [Mon, 23 Feb 2015 09:51:54 +0000 (14:51 +0530)]
Reverting because this change causes __memcpy_neon() to corrupt if
interrupted by signal handler.

Bug 200046014

This reverts commit e700ffc891047182e16f53fc0238c8fd9bf72007.

Change-Id: I53d7214259fcff94e01bed141a4b9e6a7b29890e
Reviewed-on: http://git-master/r/710306
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
(cherry picked from commit d0ef94fa57264e047bf3873a60d01709a617887b)
Reviewed-on: http://git-master/r/710309
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

arch/arm/vfp/vfpmodule.c

index da9cc26..41c9a3b 100644 (file)
@@ -589,12 +589,6 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp,
         * entry.
         */
        hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK);
-
-       /*
-        * Disable VFP in the hwstate so that we can detect if it gets
-        * used.
-        */
-       hwstate->fpexc &= ~FPEXC_EN;
        return 0;
 }
 
@@ -607,12 +601,8 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,
        unsigned long fpexc;
        int err = 0;
 
-       /*
-        * If VFP has been used, then disable it to avoid corrupting
-        * the new thread state.
-        */
-       if (hwstate->fpexc & FPEXC_EN)
-               vfp_flush_hwstate(thread);
+       /* Disable VFP to avoid corrupting the new thread state. */
+       vfp_flush_hwstate(thread);
 
        /*
         * Copy the floating point registers. There can be unused