xtensa: move coprocessor_flush to the .text section
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 25 Feb 2021 19:42:46 +0000 (11:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 13:00:09 +0000 (15:00 +0200)
commit6aaa3c2ebb4fefe06ce79b70b4b8ca43ff460ab4
tree349a911d467f931283029f4092766ea0fa0c4b52
parenta3be911a5feed914233ec2fdc23b0103e616a142
xtensa: move coprocessor_flush to the .text section

commit ab5eb336411f18fd449a1fb37d36a55ec422603f upstream.

coprocessor_flush is not a part of fast exception handlers, but it uses
parts of fast coprocessor handling code that's why it's in the same
source file. It uses call0 opcode to invoke those parts so there are no
limitations on their relative location, but the rest of the code calls
coprocessor_flush with call8 and that doesn't work when vectors are
placed in a different gigabyte-aligned area than the rest of the kernel.

Move coprocessor_flush from the .exception.text section to the .text so
that it's reachable from the rest of the kernel with call8.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/kernel/coprocessor.S