xtensa: don't clear cpenable unconditionally on release
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 27 Nov 2018 00:30:51 +0000 (16:30 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 4 Dec 2018 22:08:23 +0000 (14:08 -0800)
commitbe38e4f2cc08d91515b86a4a8ea75ba902795873
treefec12d0daf2fadea20cce426118fbb560bd6fb41
parent5dacbbef3d29598dcb6ecf747a7dae4fbb4ce039
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: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/kernel/process.c