Skip to content

Commit eb7ff90

Browse files
agnersRussell King
authored andcommitted
ARM: 8829/1: spinlock: use unified assembler language syntax
Convert the conditional infix to a postfix to make sure this inline assembly is unified syntax. Since gcc assumes non-unified syntax when emitting ARM instructions, make sure to define the syntax as unified. This allows to use LLVM's integrated assembler. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent 32fdb04 commit eb7ff90

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/arm/include/asm/spinlock.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,12 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
210210

211211
prefetchw(&rw->lock);
212212
__asm__ __volatile__(
213+
" .syntax unified\n"
213214
"1: ldrex %0, [%2]\n"
214215
" adds %0, %0, #1\n"
215216
" strexpl %1, %0, [%2]\n"
216217
WFE("mi")
217-
" rsbpls %0, %1, #0\n"
218+
" rsbspl %0, %1, #0\n"
218219
" bmi 1b"
219220
: "=&r" (tmp), "=&r" (tmp2)
220221
: "r" (&rw->lock)

0 commit comments

Comments
 (0)