aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-12 08:57:34 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-05-02 13:54:11 +0200
commitbf72630130c29e2ba42e3db8d502de6bdfaa7d9a (patch)
tree6aeb3a616b6da8e58281a5f63bd5ec8e6cfb056f /arch
parents390/nospec: rename assembler generated expoline thunks (diff)
downloadlinux-dev-bf72630130c29e2ba42e3db8d502de6bdfaa7d9a.tar.xz
linux-dev-bf72630130c29e2ba42e3db8d502de6bdfaa7d9a.zip
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 <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/boot/text_dma.S19
1 files changed, 15 insertions, 4 deletions
diff --git a/arch/s390/boot/text_dma.S b/arch/s390/boot/text_dma.S
index ea93314f4497..9715715c4c28 100644
--- a/arch/s390/boot/text_dma.S
+++ b/arch/s390/boot/text_dma.S
@@ -9,6 +9,16 @@
#include <asm/errno.h>
#include <asm/sigp.h>
+#ifdef CC_USING_EXPOLINE
+ .pushsection .dma.text.__s390_indirect_jump_r14,"axG"
+__dma__s390_indirect_jump_r14:
+ larl %r1,0f
+ ex 0,0(%r1)
+ j .
+0: br %r14
+ .popsection
+#endif
+
.section .dma.text,"ax"
/*
* Simplified version of expoline thunk. The normal thunks can not be used here,
@@ -17,10 +27,11 @@
* affects a few functions that are not performance-relevant.
*/
.macro BR_EX_DMA_r14
- larl %r1,0f
- ex 0,0(%r1)
- j .
-0: br %r14
+#ifdef CC_USING_EXPOLINE
+ jg __dma__s390_indirect_jump_r14
+#else
+ br %r14
+#endif
.endm
/*