]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/traps: Get rid of superfluous cpu_has_vx() check
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 26 Feb 2025 10:03:06 +0000 (11:03 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 4 Mar 2025 16:34:03 +0000 (17:34 +0100)
If the vector facility is installed cpu_has_vx() is always true, if it is
not installed the result is always false, and no vector exception can
happen. Therefore remove the superfluous check.

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/traps.c

index cabc38a38ae3bf1fd45494c814601d352887574b..945522266037d33c07e1b5554e44bc215a355186 100644 (file)
@@ -198,11 +198,6 @@ static void vector_exception(struct pt_regs *regs)
 {
        int si_code, vic;
 
-       if (!cpu_has_vx()) {
-               do_trap(regs, SIGILL, ILL_ILLOPN, "illegal operation");
-               return;
-       }
-
        /* get vector interrupt code from fpc */
        save_user_fpu_regs();
        vic = (current->thread.ufpu.fpc & 0xf00) >> 8;