[PATCH] selftests/powerpc: Fix compilation issue due to asm label
Breno Leitao
leitao at debian.org
Thu Nov 1 06:05:09 AEDT 2018
hi Naveen,
On 10/31/18 2:24 PM, Naveen N. Rao wrote:
> Naveen N. Rao wrote:
>> We are using 'dscr_insn' as a label in inline asm to identify if a
>> SIGILL was generated by the mtspr instruction at that point. However,
>> with inline assembly, the compiler is still free to duplicate the asm
>> statement for optimization purposes, which results in the label being
>> defined twice with the error:
>> /tmp/ccerQCql.s:874: Error: symbol `dscr_insn' is already defined
>>
>> With different compiler versions, we may also see:
>> /tmp/ccJzLDlN.o:(.toc+0x0): undefined reference to `dscr_insn'
>>
>> Remove the use of the label in the inline assembly. Instead, just look
>> for the offending instruction in the signal handler.
Cool, I've tested this patch on my mainline tree and selftests are being
able to build again. I also tested the rfi_flush_test selftest as other
tests (ptrace/ and tm/) and everything seems to be normal again.
Thank you!
>> Reported-by: Breno Leitao <leitao at debian.org>
>> Signed-off-by: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
Tested-by: Breno Leitao <leitao at debian.org>
More information about the Linuxppc-dev
mailing list