Skip to content

Commit bf72630

Browse files
author
Martin Schwidefsky
committed
s390: use proper expoline sections for .dma code
The text_dma.S code uses its own macro to generate an inline version of an expoline. To make it easier to identify all expolines in the kernel use a thunk and a branch to the thunk just like the rest of the kernel code does it. The name of the text_dma.S expoline thunk is __dma__s390_indirect_jump_r14 and the section is named .dma.text.__s390_indirect_jump_r14. This will be needed for the objtool support. Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 40a3abf commit bf72630

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

arch/s390/boot/text_dma.S

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
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+
1222
.section .dma.text,"ax"
1323
/*
1424
* Simplified version of expoline thunk. The normal thunks can not be used here,
@@ -17,10 +27,11 @@
1727
* affects a few functions that are not performance-relevant.
1828
*/
1929
.macro BR_EX_DMA_r14
20-
larl %r1,0f
21-
ex 0,0(%r1)
22-
j .
23-
0: br %r14
30+
#ifdef CC_USING_EXPOLINE
31+
jg __dma__s390_indirect_jump_r14
32+
#else
33+
br %r14
34+
#endif
2435
.endm
2536

2637
/*

0 commit comments

Comments
 (0)