From: Alexey Dobriyan <adobriyan@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com
Cc: x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: [PATCH 4/4] x86/asm: delete dummy variable in enqcmds()
Date: Fri, 7 Mar 2025 09:12:03 +0300 [thread overview]
Message-ID: <20250307061203.3281-4-adobriyan@gmail.com> (raw)
In-Reply-To: <20250307061203.3281-1-adobriyan@gmail.com>
Cast to pointer-to-array instead.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/x86/include/asm/special_insns.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index b24c6c945c38..aa5f015ff2a2 100644
--- a/arch/x86/include/asm/special_insns.h
+++ b/arch/x86/include/asm/special_insns.h
@@ -257,8 +257,6 @@ static inline void movdir64b_io(void __iomem *dst, const void *src)
*/
static inline int enqcmds(void __iomem *dst, const void *src)
{
- const struct { char _[64]; } *__src = src;
- struct { char _[64]; } __iomem *__dst = dst;
bool zf;
/*
@@ -268,8 +266,8 @@ static inline int enqcmds(void __iomem *dst, const void *src)
*/
asm volatile(".byte 0xf3, 0x0f, 0x38, 0xf8, 0x02, 0x66, 0x90"
CC_SET(z)
- : CC_OUT(z) (zf), "+m" (*__dst)
- : "m" (*__src), "a" (__dst), "d" (__src));
+ : CC_OUT(z) (zf), "+m" (*(char __iomem(*)[64])dst)
+ : "m" (*(const char(*)[64])src), "a" (dst), "d" (src));
/* Submission failure is indicated via EFLAGS.ZF=1 */
if (zf)
--
2.45.3
next prev parent reply other threads:[~2025-03-07 6:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 6:12 [PATCH 1/4] x86/asm: inline constant inputs in rdpkru(), wrpkru() Alexey Dobriyan
2025-03-07 6:12 ` [PATCH 2/4] x86/asm: delete dummy variable in clwb() Alexey Dobriyan
2025-03-07 6:12 ` [PATCH 3/4] x86/asm: delete dummy variables in movdir64b() Alexey Dobriyan
2025-03-07 11:49 ` Ingo Molnar
2025-03-07 11:54 ` H. Peter Anvin
2025-03-07 16:15 ` Alexey Dobriyan
2025-03-07 16:23 ` H. Peter Anvin
2025-03-07 6:12 ` Alexey Dobriyan [this message]
2025-03-07 16:29 ` [PATCH 1/4] x86/asm: inline constant inputs in rdpkru(), wrpkru() Dave Hansen
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=20250307061203.3281-4-adobriyan@gmail.com \
--to=adobriyan@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.