Skip to contentSkip to conversation

s390/ftrace: use la instead of aghik in return_to_handler()

PATCH In review Heiko Carstens 3 participants 3 messages Jul 26, 2023 s390

lore
Share & tools
lore

Heiko Carstens

author maintainer
#0 lore raw

PATCH 1/1 s390/ftrace: use la instead of aghik in return_to_handler()

Nathan Chancellor reported the following build error when compiling the kernel with CONFIG_MARCH_Z10=y:

arch/s390/kernel/mcount.S: Assembler messages:
arch/s390/kernel/mcount.S:140: Error: Unrecognized opcode: `aghik'

The aghik instruction is only available since z196. Use the la instruction instead which is available for all machines.

Fixes 1256e70a082a ("s390/ftrace: enable HAVE_FUNCTION_GRAPH_RETVAL")
---
 arch/s390/kernel/mcount.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/mcount.S +1 -1
index d2596e0df6fa..71c5fa05e7f1 100644
@@ -137,7 +137,7 @@ SYM_FUNC_START(return_to_handler)
 	lgr	%r1,%r15
 	aghi	%r15,-(STACK_FRAME_OVERHEAD+__FGRAPH_RET_SIZE)
 	stg	%r1,__SF_BACKCHAIN(%r15)
-	aghik	%r3,%r15,STACK_FRAME_OVERHEAD
+	la	%r3,STACK_FRAME_OVERHEAD(%r15)
 	stg	%r1,__FGRAPH_RET_FP(%r3)
 	stg	%r2,__FGRAPH_RET_GPR2(%r3)
 	lgr	%r2,%r3
Signature · 1 line
2.39.2
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Heiko Carstens

Nathan Chancellor reported the following build error when compiling the kernel with CONFIG_MARCH_Z10=y:

arch/s390/kernel/mcount.S: Assembler messages:
arch/s390/kernel/mcount.S:140: Error: Unrecognized opcode: `aghik'

The aghik instruction is only available since z196. Use the la instruction instead which is available for all machines.

Fixes 1256e70a082a ("s390/ftrace: enable HAVE_FUNCTION_GRAPH_RETVAL")
---
 arch/s390/kernel/mcount.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/mcount.S +0 -0
index d2596e0df6fa..71c5fa05e7f1 100644

arch/s390/kernel/mcount.S SYM_FUNC_START(return_to_handler) · line 143

Quoted 8 lines
arch/s390/kernel/mcount.S +1 -1
@@ -137,7 +137,7 @@ SYM_FUNC_START(return_to_handler)
 	lgr	%r1,%r15
 	aghi	%r15,-(STACK_FRAME_OVERHEAD+__FGRAPH_RET_SIZE)
 	stg	%r1,__SF_BACKCHAIN(%r15)
-	aghik	%r3,%r15,STACK_FRAME_OVERHEAD
+	la	%r3,STACK_FRAME_OVERHEAD(%r15)
 	stg	%r1,__FGRAPH_RET_FP(%r3)
 	stg	%r2,__FGRAPH_RET_GPR2(%r3)
 	lgr	%r2,%r3
Tested-by on v1 1/1
#2 lore raw
In reply to Heiko Carstens
Quoted 6 lines · Heiko Carstens

Nathan Chancellor reported the following build error when compiling the kernel with CONFIG_MARCH_Z10=y:

arch/s390/kernel/mcount.S: Assembler messages:
arch/s390/kernel/mcount.S:140: Error: Unrecognized opcode: `aghik'

Quoted 7 lines

The aghik instruction is only available since z196. Use the la instruction instead which is available for all machines.

Fixes 1256e70a082a ("s390/ftrace: enable HAVE_FUNCTION_GRAPH_RETVAL")
Quoted 20 lines
---
 arch/s390/kernel/mcount.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/mcount.S +1 -1
index d2596e0df6fa..71c5fa05e7f1 100644
@@ -137,7 +137,7 @@ SYM_FUNC_START(return_to_handler)
 	lgr	%r1,%r15
 	aghi	%r15,-(STACK_FRAME_OVERHEAD+__FGRAPH_RET_SIZE)
 	stg	%r1,__SF_BACKCHAIN(%r15)
-	aghik	%r3,%r15,STACK_FRAME_OVERHEAD
+	la	%r3,STACK_FRAME_OVERHEAD(%r15)
 	stg	%r1,__FGRAPH_RET_FP(%r3)
 	stg	%r2,__FGRAPH_RET_GPR2(%r3)
 	lgr	%r2,%r3
Signature · 1 line
2.39.2