Build error around 'aghik' after commit 1256e70a082a ("s390/ftrace: enable HAVE_FUNCTION_GRAPH_RETVAL")
Hi Sven and Heiko,
Apologies if this has been reported/fixed already, I checked the s390 tree but I did not see any changes there nor did I find anything when searching lore. After commit 1256e70a082a ("s390/ftrace: enable HAVE_FUNCTION_GRAPH_RETVAL") in -next, I see the following errors when building Debian's configuration [1], which selects CONFIG_MARCH_Z10=y.
GCC/binutils:
arch/s390/kernel/mcount.S: Assembler messages:
arch/s390/kernel/mcount.S:140: Error: Unrecognized opcode: `aghik'
clang:
arch/s390/kernel/mcount.S:140:2: error: instruction requires: distinct-ops
aghik %r3,%r15,160
^
It seems like there is already some handling for this situation in mcount.S but my knowledge of s390 assembly is basically non-existent, hence this report in lieu of a patch. I am more than happy to provide any additional information or test any patches if necessary.
[1]: https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/config/s390x/config
Cheers,
Nathan
Heiko Carstens
maintainerHi Nathan,
Quoted 13 lines
Apologies if this has been reported/fixed already, I checked the s390 tree but I did not see any changes there nor did I find anything when searching lore. After commit
1256e70a082a("s390/ftrace: enableHAVE_FUNCTION_GRAPH_RETVAL") in -next, I see the following errors when building Debian's configuration [1], which selectsCONFIG_MARCH_Z10=y.GCC/binutils:
arch/s390/kernel/mcount.S: Assembler messages:
arch/s390/kernel/mcount.S:140: Error: Unrecognized opcode: `aghik'clang:
Quoted 8 lines
arch/s390/kernel/mcount.S:140:2: error: instruction requires: distinct-ops
aghik %r3,%r15,160
^It seems like there is already some handling for this situation in
mcount.Sbut my knowledge of s390 assembly is basically non-existent, hence this report in lieu of a patch. I am more than happy to provide any additional information or test any patches if necessary.
Thanks, for reporting. Yet another bug where an instruction which is only available on later machines (in this case z196) is used unconditionally. I really need to add some automated test so this kind of trivial bugs don't escape.
Will fix.