Commit be38e4f2 authored by Max Filippov's avatar Max Filippov

xtensa: don't clear cpenable unconditionally on release

Clearing cpenable special register for a task without changing
coprocessor owner for the coprocessors that were enabled will result in
coprocessor context flush and immediate reload at the next attempt to
access this coprocessor if it happens before the context switch.
Avoid it by only clearing cpenable special register if
coprocessor_release_all is called for the current task.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 5dacbbef
......@@ -87,6 +87,7 @@ void coprocessor_release_all(struct thread_info *ti)
}
ti->cpenable = cpenable;
if (ti == current_thread_info())
xtensa_set_sr(0, cpenable);
preempt_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment