From: Stefan Agner <stefan@agner.ch>
To: linux@armlinux.org.uk
Cc: ndesaulniers@google.com, natechancellor@gmail.com, arnd@arndb.de,
ard.biesheuvel@linaro.org, nicolas.pitre@linaro.org,
peterz@infradead.org, mingo@redhat.com, will.deacon@arm.com,
julien.thierry@arm.com, mark.rutland@arm.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Stefan Agner <stefan@agner.ch>
Subject: [PATCH v2 3/3] ARM: spinlock: use unified assembler language syntax
Date: Thu, 3 Jan 2019 22:48:15 +0100 [thread overview]
Message-ID: <ad0fbab91f337ec99e3a2a3d60886a785da34366.1546551693.git.stefan@agner.ch> (raw)
In-Reply-To: <cover.1546551693.git.stefan@agner.ch>
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>
---
Changes since v1:
- Explicitly use unified syntax for inline assembly
arch/arm/include/asm/spinlock.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index 099c78fcf62d..8f009e788ad4 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -210,11 +210,12 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
prefetchw(&rw->lock);
__asm__ __volatile__(
+" .syntax unified\n"
"1: ldrex %0, [%2]\n"
" adds %0, %0, #1\n"
" strexpl %1, %0, [%2]\n"
WFE("mi")
-" rsbpls %0, %1, #0\n"
+" rsbspl %0, %1, #0\n"
" bmi 1b"
: "=&r" (tmp), "=&r" (tmp2)
: "r" (&rw->lock)
--
2.20.1
next prev parent reply other threads:[~2019-01-03 21:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 21:48 [PATCH v2 0/3] ARM: trivial assembly fixes to enable LLVM as Stefan Agner
2019-01-03 21:48 ` [PATCH v2 1/3] ARM: fix argument count to match macro definition Stefan Agner
2019-01-05 16:05 ` Nicolas Pitre
2019-01-03 21:48 ` [PATCH v2 2/3] ARM: uaccess: use unified assembler language syntax Stefan Agner
2019-01-05 16:12 ` Nicolas Pitre
2019-01-07 21:50 ` Stefan Agner
2019-01-03 21:48 ` Stefan Agner [this message]
2019-01-05 16:13 ` [PATCH v2 3/3] ARM: spinlock: " Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad0fbab91f337ec99e3a2a3d60886a785da34366.1546551693.git.stefan@agner.ch \
--to=stefan@agner.ch \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=julien.thierry@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).