s390: remove unused s390_base_ext_handler
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 24 Sep 2020 15:12:08 +0000 (17:12 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Nov 2020 10:20:58 +0000 (11:20 +0100)
s390_base_ext_handler_fn haven't been used since its introduction in
commit ab14de6c37fa ("[S390] Convert memory detection into C code.").

s390_base_ext_handler itself is currently falsely storing 16 registers
at __LC_SAVE_AREA_ASYNC rewriting several following lowcore values:
cpu_flags, return_psw, return_mcck_psw, sync_enter_timer and
async_enter_timer.

Besides that s390_base_ext_handler itself is only potentially hiding
EXT interrupts which should not have happen in the first place. Any
piece of code which requires EXT interrupts before fully functional
ext_int_handler is enabled has to do it on its own, like this is done
by sclp_early_cmd() which is doing EXT interrupts handling synchronously
in sclp_early_wait_irq().

With s390_base_ext_handler removed unexpected EXT interrupt leads
to disabled wait with the address 0x1b0 (__LC_EXT_NEW_PSW), which is
currently setup in the decompressor.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/processor.h
arch/s390/kernel/base.S
arch/s390/kernel/early.c

index 962da04234af406ec471d4a01def45f48e9699cc..2043c562ec551016e613828814ca246a92355e70 100644 (file)
@@ -318,14 +318,10 @@ static __always_inline void __noreturn disabled_wait(void)
 }
 
 /*
- * Basic Machine Check/Program Check Handler.
+ * Basic Program Check Handler.
  */
-
 extern void s390_base_pgm_handler(void);
-extern void s390_base_ext_handler(void);
-
 extern void (*s390_base_pgm_handler_fn)(void);
-extern void (*s390_base_ext_handler_fn)(void);
 
 #define ARCH_LOW_ADDRESS_LIMIT 0x7fffffffUL
 
index b79e0fd571f83a30d28cff98b10402496f41b9ed..d255c69c1779586ccdb959d7ab4066a2f03e700d 100644 (file)
 #include <asm/asm-offsets.h>
 #include <asm/nospec-insn.h>
 #include <asm/ptrace.h>
-#include <asm/sigp.h>
 
        GEN_BR_THUNK %r9
        GEN_BR_THUNK %r14
 
-ENTRY(s390_base_ext_handler)
-       stmg    %r0,%r15,__LC_SAVE_AREA_ASYNC
-       basr    %r13,0
-0:     aghi    %r15,-STACK_FRAME_OVERHEAD
-       larl    %r1,s390_base_ext_handler_fn
-       lg      %r9,0(%r1)
-       ltgr    %r9,%r9
-       jz      1f
-       BASR_EX %r14,%r9
-1:     lmg     %r0,%r15,__LC_SAVE_AREA_ASYNC
-       ni      __LC_EXT_OLD_PSW+1,0xfd # clear wait state bit
-       lpswe   __LC_EXT_OLD_PSW
-ENDPROC(s390_base_ext_handler)
-
-       .section .bss
-       .align 8
-       .globl s390_base_ext_handler_fn
-s390_base_ext_handler_fn:
-       .quad   0
-       .previous
-
 ENTRY(s390_base_pgm_handler)
        stmg    %r0,%r15,__LC_SAVE_AREA_SYNC
        basr    %r13,0
index 705844f739345a3211b38281c164d50b7b03b4cb..cc89763a4d3cfd69ce42af1b5ccd49988203203f 100644 (file)
@@ -169,12 +169,10 @@ static noinline __init void setup_lowcore_early(void)
 {
        psw_t psw;
 
+       psw.addr = (unsigned long)s390_base_pgm_handler;
        psw.mask = PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA;
        if (IS_ENABLED(CONFIG_KASAN))
                psw.mask |= PSW_MASK_DAT;
-       psw.addr = (unsigned long) s390_base_ext_handler;
-       S390_lowcore.external_new_psw = psw;
-       psw.addr = (unsigned long) s390_base_pgm_handler;
        S390_lowcore.program_new_psw = psw;
        s390_base_pgm_handler_fn = early_pgm_check_handler;
        S390_lowcore.preempt_count = INIT_PREEMPT_COUNT;