Skip to content

Commit 29e5bc0

Browse files
svens-s390hcahca
authored andcommitted
s390/entry: remove OUTSIDE macro
With only one OUTSIDE user left, remove the macro and move the code directly to the machine check handler. This has the advantage that it is much easier to determine which registers are used. Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent c239c83 commit 29e5bc0

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

arch/s390/kernel/entry.S

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -119,29 +119,6 @@ _LPP_OFFSET = __LC_LPP
119119
.endm
120120

121121
#if IS_ENABLED(CONFIG_KVM)
122-
/*
123-
* The OUTSIDE macro jumps to the provided label in case the value
124-
* in the provided register is outside of the provided range. The
125-
* macro is useful for checking whether a PSW stored in a register
126-
* pair points inside or outside of a block of instructions.
127-
* @reg: register to check
128-
* @start: start of the range
129-
* @end: end of the range
130-
* @outside_label: jump here if @reg is outside of [@start..@end)
131-
*/
132-
.macro OUTSIDE reg,start,end,outside_label
133-
lgr %r14,\reg
134-
larl %r13,\start
135-
slgr %r14,%r13
136-
clgfrl %r14,.Lrange_size\@
137-
jhe \outside_label
138-
.section .rodata, "a"
139-
.balign 4
140-
.Lrange_size\@:
141-
.long \end - \start
142-
.previous
143-
.endm
144-
145122
.macro SIEEXIT
146123
lg %r9,__SF_SIE_CONTROL(%r15) # get control block pointer
147124
ni __SIE_PROG0C+3(%r9),0xfe # no longer in SIE
@@ -236,7 +213,6 @@ SYM_FUNC_START(__sie64a)
236213
lg %r14,__SF_SIE_CONTROL(%r15) # get control block pointer
237214
ni __SIE_PROG0C+3(%r14),0xfe # no longer in SIE
238215
lctlg %c1,%c1,__LC_KERNEL_ASCE # load primary asce
239-
.Lsie_done:
240216
ni __LC_CPU_FLAGS+7,255-_CIF_SIE
241217
# some program checks are suppressing. C code (e.g. do_protection_exception)
242218
# will rewind the PSW by the ILC, which is often 4 bytes in case of SIE. There
@@ -525,7 +501,10 @@ SYM_CODE_START(mcck_int_handler)
525501
# and entering SIE (or leaving and clearing the flag). This
526502
# would cause machine checks targeted at the guest to be
527503
# handled by the host.
528-
OUTSIDE %r9,.Lsie_entry,.Lsie_leave,4f
504+
larl %r14,.Lsie_entry
505+
clgrjl %r9,%r14, 4f
506+
larl %r14,.Lsie_leave
507+
clgrjhe %r9,%r14, 4f
529508
oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
530509
4: BPENTER __SF_SIE_FLAGS(%r15),_TIF_ISOLATE_BP_GUEST
531510
SIEEXIT

0 commit comments

Comments
 (0)