public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, drjones@redhat.com, lvivier@redhat.com
Subject: [PATCH v2 6/7] lib/arm64/spinlock: Fix inline assembly for Clang
Date: Thu,  1 Oct 2020 09:22:33 +0200	[thread overview]
Message-ID: <20201001072234.143703-7-thuth@redhat.com> (raw)
In-Reply-To: <20201001072234.143703-1-thuth@redhat.com>

/home/travis/build/huth/kvm-unit-tests/lib/arm64/spinlock.c:29:12: error:
 value size does not match register size specified by the constraint and
 modifier [-Werror,-Wasm-operand-widths]
                : "=&r" (val), "=&r" (fail)
                         ^
/home/travis/build/huth/kvm-unit-tests/lib/arm64/spinlock.c:27:9: note: use
 constraint modifier "w"
                "       mov     %0, #1\n"
                                ^~
                                %w0

Use the "w" modifier as suggested to fix the issue.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 lib/arm64/spinlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/arm64/spinlock.c b/lib/arm64/spinlock.c
index fac4fc9..258303d 100644
--- a/lib/arm64/spinlock.c
+++ b/lib/arm64/spinlock.c
@@ -24,7 +24,7 @@ void spin_lock(struct spinlock *lock)
 		asm volatile(
 		"1:	ldaxr	%w0, [%2]\n"
 		"	cbnz	%w0, 1b\n"
-		"	mov	%0, #1\n"
+		"	mov	%w0, #1\n"
 		"	stxr	%w1, %w0, [%2]\n"
 		: "=&r" (val), "=&r" (fail)
 		: "r" (&lock->v)
-- 
2.18.2


  parent reply	other threads:[~2020-10-01  7:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  7:22 [PATCH v2 0/7] Update travis CI Thomas Huth
2020-10-01  7:22 ` [PATCH v2 1/7] travis.yml: Rework the x86 64-bit tests Thomas Huth
2020-10-01  7:22 ` [PATCH v2 2/7] travis.yml: Refresh the x86 32-bit test list Thomas Huth
2020-10-01  7:22 ` [PATCH v2 3/7] travis.yml: Add the selftest-setup ppc64 test Thomas Huth
2020-10-01  7:22 ` [PATCH v2 4/7] kbuild: fix asm-offset generation to work with clang Thomas Huth
2020-10-01  9:12   ` Andrew Jones
2020-10-01  7:22 ` [PATCH v2 5/7] arm/pmu: Fix inline assembly for Clang Thomas Huth
2020-10-01  9:12   ` Andrew Jones
2020-10-01  9:14     ` Andrew Jones
2020-10-01 10:50       ` Thomas Huth
2020-10-01 12:02         ` Andrew Jones
2020-10-01  7:22 ` Thomas Huth [this message]
2020-10-01  9:12   ` [PATCH v2 6/7] lib/arm64/spinlock: " Andrew Jones
2020-10-01  7:22 ` [PATCH v2 7/7] travis.yml: Rework the aarch64 jobs Thomas Huth
2020-10-01  9:18 ` [PATCH v2 0/7] Update travis CI Paolo Bonzini

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=20201001072234.143703-7-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.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