|
@@ -94,18 +94,21 @@ void coprocessor_release_all(struct thread_info *ti)
|
|
|
|
|
|
void coprocessor_flush_all(struct thread_info *ti)
|
|
|
{
|
|
|
- unsigned long cpenable;
|
|
|
+ unsigned long cpenable, old_cpenable;
|
|
|
int i;
|
|
|
|
|
|
preempt_disable();
|
|
|
|
|
|
+ RSR_CPENABLE(old_cpenable);
|
|
|
cpenable = ti->cpenable;
|
|
|
+ WSR_CPENABLE(cpenable);
|
|
|
|
|
|
for (i = 0; i < XCHAL_CP_MAX; i++) {
|
|
|
if ((cpenable & 1) != 0 && coprocessor_owner[i] == ti)
|
|
|
coprocessor_flush(ti, i);
|
|
|
cpenable >>= 1;
|
|
|
}
|
|
|
+ WSR_CPENABLE(old_cpenable);
|
|
|
|
|
|
preempt_enable();
|
|
|
}
|