diff options
author | Colin Cross <ccross@android.com> | 2011-10-01 15:18:50 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-02 09:41:25 +0100 |
commit | a92823d91a7f1e52b65c525eb9842d6d821d997e (patch) | |
tree | ea6da4a3aea121aa0fa54560756ec25aab2b16e5 | |
parent | c3db0b5de9ec0e726ddf53ac521db30fba685d34 (diff) |
Revert "ARM: vfp: ensure that thread flushing works if preempted"
This reverts commit 4f77fd436e53acf5bc0a06a24331f64b07fb33ec.
-rw-r--r-- | arch/arm/vfp/vfpmodule.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index ceadc94df87..d34b3dc3046 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -90,27 +90,24 @@ static void vfp_thread_flush(struct thread_info *thread) union vfp_state *vfp = &thread->vfpstate; unsigned int cpu; + memset(vfp, 0, sizeof(union vfp_state)); + + vfp->hard.fpexc = FPEXC_EN; + vfp->hard.fpscr = FPSCR_ROUND_NEAREST; +#ifdef CONFIG_SMP + vfp->hard.cpu = NR_CPUS; +#endif + /* * Disable VFP to ensure we initialize it first. We must ensure - * that the modification of vfp_current_hw_state[] and hardware - * disable are done for the same CPU and without preemption. - * - * Do this first to ensure that preemption won't overwrite our - * state saving should access to the VFP be enabled at this point. + * that the modification of vfp_current_hw_state[] and hardware disable + * are done for the same CPU and without preemption. */ cpu = get_cpu(); if (vfp_current_hw_state[cpu] == vfp) vfp_current_hw_state[cpu] = NULL; fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); put_cpu(); - - memset(vfp, 0, sizeof(union vfp_state)); - - vfp->hard.fpexc = FPEXC_EN; - vfp->hard.fpscr = FPSCR_ROUND_NEAREST; -#ifdef CONFIG_SMP - vfp->hard.cpu = NR_CPUS; -#endif } static void vfp_thread_exit(struct thread_info *thread) |