Skip to content

Commit 463f36c

Browse files
eaibmzhcahca
authored andcommitted
s390/boot: fix use of expolines in the DMA code
The DMA code section of the decompressor must be compiled with expolines if Spectre V2 mitigation has been enabled for the decompressed kernel. This is required because although the decompressor's image contains the DMA code section, it is handed over to the decompressed kernel for use. Because the DMA code is already slow w/o expolines, use expolines always regardless whether the decompressed kernel is using them or not. This simplifies the DMA code by dropping the conditional compilation of expolines. Fixes: bf72630 ("s390: use proper expoline sections for .dma code") Cc: <[email protected]> # 5.2 Signed-off-by: Alexander Egorenkov <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent f8c2602 commit 463f36c

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

arch/s390/boot/text_dma.S

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
#include <asm/errno.h>
1010
#include <asm/sigp.h>
1111

12-
#ifdef CC_USING_EXPOLINE
13-
.pushsection .dma.text.__s390_indirect_jump_r14,"axG"
14-
__dma__s390_indirect_jump_r14:
15-
larl %r1,0f
16-
ex 0,0(%r1)
17-
j .
18-
0: br %r14
19-
.popsection
20-
#endif
21-
2212
.section .dma.text,"ax"
2313
/*
2414
* Simplified version of expoline thunk. The normal thunks can not be used here,
@@ -27,11 +17,10 @@ __dma__s390_indirect_jump_r14:
2717
* affects a few functions that are not performance-relevant.
2818
*/
2919
.macro BR_EX_DMA_r14
30-
#ifdef CC_USING_EXPOLINE
31-
jg __dma__s390_indirect_jump_r14
32-
#else
33-
br %r14
34-
#endif
20+
larl %r1,0f
21+
ex 0,0(%r1)
22+
j .
23+
0: br %r14
3524
.endm
3625

3726
/*

0 commit comments

Comments
 (0)