From: Raghavendra Rao Ananta <rananta@google.com>
To: Subhasish Ghosh <subhasish.ghosh@arm.com>,
Joey Gouly <joey.gouly@arm.com>,
Andrew Jones <andrew.jones@linux.dev>
Cc: Oliver Upton <oliver.upton@linux.dev>,
Marc Zyngier <maz@kernel.org>,
Raghavendra Rao Anata <rananta@google.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH v2 1/4] arm: Fix clang error in sve_vl()
Date: Wed, 23 Oct 2024 15:26:35 +0000 [thread overview]
Message-ID: <20241023152638.3317648-2-rananta@google.com> (raw)
In-Reply-To: <20241023152638.3317648-1-rananta@google.com>
Fix the following clang error in sve_vl():
In file included from arm/selftest.c:16:
kvm-unit-tests/lib/asm/processor.h:163:16:
error: value size does not match register size specified by the
constraint and modifier [-Werror,-Wasm-operand-widths]
: "=r" (vl));
^
kvm-unit-tests/lib/asm/processor.h:162:14:
note: use constraint modifier "w"
"rdvl %0, #8"
^~
%w0
1 error generated.
Fixes: d47d370c8f ("arm: Add test for FPU/SIMD context save/restore")
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
---
lib/arm64/asm/processor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h
index b28d41fd..e261e74d 100644
--- a/lib/arm64/asm/processor.h
+++ b/lib/arm64/asm/processor.h
@@ -159,7 +159,7 @@ static inline int sve_vl(void)
int vl;
asm volatile(".arch_extension sve\n"
- "rdvl %0, #8"
+ "rdvl %w0, #8"
: "=r" (vl));
return vl;
--
2.47.0.105.g07ac214952-goog
next prev parent reply other threads:[~2024-10-23 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 15:26 [kvm-unit-tests PATCH v2 0/4] Fix arm64 clang errors on fpu tests Raghavendra Rao Ananta
2024-10-23 15:26 ` Raghavendra Rao Ananta [this message]
2024-10-23 15:26 ` [kvm-unit-tests PATCH v2 2/4] arm: fpu: Convert 'q' registers to 'v' to satisfy clang Raghavendra Rao Ananta
2024-10-23 15:26 ` [kvm-unit-tests PATCH v2 3/4] arm: fpu: Add '.arch_extension fp' to fpu macros Raghavendra Rao Ananta
2024-10-23 15:26 ` [kvm-unit-tests PATCH v2 4/4] arm: fpu: Fix the input/output args for inline asm in fpu.c Raghavendra Rao Ananta
2024-10-24 8:31 ` [kvm-unit-tests PATCH 5/4] arm64: gitlab-ci: Add clang build tests Andrew Jones
2024-10-24 8:40 ` [kvm-unit-tests PATCH v2 0/4] Fix arm64 clang errors on fpu tests Andrew Jones
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=20241023152638.3317648-2-rananta@google.com \
--to=rananta@google.com \
--cc=andrew.jones@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=subhasish.ghosh@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