Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefan Agner and committed by
Russell King
eb7ff902 32fdb046

+2 -1
+2 -1
arch/arm/include/asm/spinlock.h
··· 210 210 211 211 prefetchw(&rw->lock); 212 212 __asm__ __volatile__( 213 + " .syntax unified\n" 213 214 "1: ldrex %0, [%2]\n" 214 215 " adds %0, %0, #1\n" 215 216 " strexpl %1, %0, [%2]\n" 216 217 WFE("mi") 217 - " rsbpls %0, %1, #0\n" 218 + " rsbspl %0, %1, #0\n" 218 219 " bmi 1b" 219 220 : "=&r" (tmp), "=&r" (tmp2) 220 221 : "r" (&rw->lock)