diff options
| -rw-r--r-- | arch/arm/vfp/vfpmodule.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index c5767b5a4318..b0197b2c857d 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
| @@ -577,12 +577,6 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp, | |||
| 577 | * entry. | 577 | * entry. |
| 578 | */ | 578 | */ |
| 579 | hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK); | 579 | hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK); |
| 580 | |||
| 581 | /* | ||
| 582 | * Disable VFP in the hwstate so that we can detect if it gets | ||
| 583 | * used. | ||
| 584 | */ | ||
| 585 | hwstate->fpexc &= ~FPEXC_EN; | ||
| 586 | return 0; | 580 | return 0; |
| 587 | } | 581 | } |
| 588 | 582 | ||
| @@ -595,12 +589,8 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, | |||
| 595 | unsigned long fpexc; | 589 | unsigned long fpexc; |
| 596 | int err = 0; | 590 | int err = 0; |
| 597 | 591 | ||
| 598 | /* | 592 | /* Disable VFP to avoid corrupting the new thread state. */ |
| 599 | * If VFP has been used, then disable it to avoid corrupting | 593 | vfp_flush_hwstate(thread); |
| 600 | * the new thread state. | ||
| 601 | */ | ||
| 602 | if (hwstate->fpexc & FPEXC_EN) | ||
| 603 | vfp_flush_hwstate(thread); | ||
| 604 | 594 | ||
| 605 | /* | 595 | /* |
| 606 | * Copy the floating point registers. There can be unused | 596 | * Copy the floating point registers. There can be unused |
