]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/fpu: Add fpc exception handler / remove fixup section again
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 10 Jan 2025 10:52:17 +0000 (11:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:44 +0000 (10:05 +0100)
commit4801e961be614a3c49afdf604e0ee76b51a93842
treea165b4d1e28720425ad4b7dfc1dc26d3d8f0a9c3
parentc6dd70e5b465a2b77c7a7c3d868736d302e29aec
s390/fpu: Add fpc exception handler / remove fixup section again

commit ae02615b7fcea9ce9a4ec40b3c5b5dafd322b179 upstream.

The fixup section was added again by mistake when test_fp_ctl() was
removed. The reason for the removal of the fixup section is described in
commit 484a8ed8b7d1 ("s390/extable: add dedicated uaccess handler").
Remove it again for the same reason.

Add an exception handler which handles exceptions when the floating point
control register is attempted to be set to invalid values. The exception
handler sets the floating point control register to zero and continues
execution at the specified address.

The new sfpc inline assembly is open-coded to make back porting a bit
easier.

Fixes: 702644249d3e ("s390/fpu: get rid of test_fp_ctl()")
Cc: stable@vger.kernel.org
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/include/asm/asm-extable.h
arch/s390/include/asm/fpu-insn.h
arch/s390/kernel/vmlinux.lds.S
arch/s390/mm/extable.c