Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46839 )
Change subject: arch/x86/spinlock: Drop linker section in inline assembly ......................................................................
arch/x86/spinlock: Drop linker section in inline assembly
The linker section isn't required or specified in the linker script. This confuses GCC and prevents garbage collecting functions using spinlocks, which might cause linker errors.
Tested by compiling the C SIPI vector with spinlocks.
Change-Id: Ia4f5a8f4aec0e05bc35359b334845c177867d4a4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/arch/x86/include/arch/smp/spinlock.h 1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/46839/1
diff --git a/src/arch/x86/include/arch/smp/spinlock.h b/src/arch/x86/include/arch/smp/spinlock.h index 799ac2c..37e3eaf 100644 --- a/src/arch/x86/include/arch/smp/spinlock.h +++ b/src/arch/x86/include/arch/smp/spinlock.h @@ -35,13 +35,11 @@ "\n1:\t" \ "lock ; decb %0\n\t" \ "js 2f\n" \ - ".section .text.lock,"ax"\n" \ "2:\t" \ "cmpb $0,%0\n\t" \ "rep;nop\n\t" \ "jle 2b\n\t" \ - "jmp 1b\n" \ - ".previous" + "jmp 1b\n"
/* * This works. Despite all the confusion.