WIP FPC-III support
[linux/fpc-iii.git] / arch / s390 / kernel / base.S
blobd255c69c1779586ccdb959d7ab4066a2f03e700d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  *  arch/s390/kernel/base.S
4  *
5  *    Copyright IBM Corp. 2006, 2007
6  *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
7  *               Michael Holzheu <holzheu@de.ibm.com>
8  */
10 #include <linux/linkage.h>
11 #include <asm/asm-offsets.h>
12 #include <asm/nospec-insn.h>
13 #include <asm/ptrace.h>
15         GEN_BR_THUNK %r9
16         GEN_BR_THUNK %r14
18 ENTRY(s390_base_pgm_handler)
19         stmg    %r0,%r15,__LC_SAVE_AREA_SYNC
20         basr    %r13,0
21 0:      aghi    %r15,-STACK_FRAME_OVERHEAD
22         larl    %r1,s390_base_pgm_handler_fn
23         lg      %r9,0(%r1)
24         ltgr    %r9,%r9
25         jz      1f
26         BASR_EX %r14,%r9
27         lmg     %r0,%r15,__LC_SAVE_AREA_SYNC
28         lpswe   __LC_PGM_OLD_PSW
29 1:      lpswe   disabled_wait_psw-0b(%r13)
30 ENDPROC(s390_base_pgm_handler)
32         .align  8
33 disabled_wait_psw:
34         .quad   0x0002000180000000,0x0000000000000000 + s390_base_pgm_handler
36         .section .bss
37         .align 8
38         .globl s390_base_pgm_handler_fn
39 s390_base_pgm_handler_fn:
40         .quad   0
41         .previous