mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
Revert "ARM: vfp: ensure that thread flushing works if preempted"
This reverts commit 4f77fd436e.
This commit is contained in:
@@ -89,20 +89,6 @@ static void vfp_thread_flush(struct thread_info *thread)
|
||||
union vfp_state *vfp = &thread->vfpstate;
|
||||
unsigned int cpu;
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
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;
|
||||
@@ -110,6 +96,17 @@ static void vfp_thread_flush(struct thread_info *thread)
|
||||
#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.
|
||||
*/
|
||||
cpu = get_cpu();
|
||||
if (vfp_current_hw_state[cpu] == vfp)
|
||||
vfp_current_hw_state[cpu] = NULL;
|
||||
fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
|
||||
put_cpu();
|
||||
}
|
||||
|
||||
static void vfp_thread_exit(struct thread_info *thread)
|
||||
|
||||
Reference in New Issue
Block a user