]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Fix compilation issue due to asm label
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Wed, 31 Oct 2018 17:18:13 +0000 (22:48 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 31 Oct 2018 23:06:03 +0000 (10:06 +1100)
commitc9fc2273380cc4ad02fd45c5e6623d7978102f79
tree2a4d2b0dcd3bde1dc35b6f0a263a93c0d37f2522
parent5fed00c509bd03731de125f9e9b928bd4b4043a9
selftests/powerpc: Fix compilation issue due to asm label

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.

Fixes: 84d1ad5bebec ("selftests/powerpc: Add test to verify rfi flush across a system call")
Reported-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/utils.c