All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH -tip 3/4] x86/idle: Remove unneeded delimiters from asm templates
Date: Wed,  2 Apr 2025 20:08:07 +0200	[thread overview]
Message-ID: <20250402180827.3762-3-ubizjak@gmail.com> (raw)
In-Reply-To: <20250402180827.3762-1-ubizjak@gmail.com>

Delimiters at the end of asm templates are not needed. Remove
them to make asm instruction length calculations more accurate.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
 arch/x86/include/asm/mwait.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/mwait.h b/arch/x86/include/asm/mwait.h
index 006b150bcb5f..65228861b894 100644
--- a/arch/x86/include/asm/mwait.h
+++ b/arch/x86/include/asm/mwait.h
@@ -32,8 +32,8 @@ static __always_inline void __monitor(const void *eax, u32 ecx, u32 edx)
 
 static __always_inline void __monitorx(const void *eax, u32 ecx, u32 edx)
 {
-	/* "monitorx %eax, %ecx, %edx;" */
-	asm volatile(".byte 0x0f, 0x01, 0xfa;"
+	/* "monitorx %eax, %ecx, %edx" */
+	asm volatile(".byte 0x0f, 0x01, 0xfa"
 		     :: "a" (eax), "c" (ecx), "d"(edx));
 }
 
@@ -74,8 +74,8 @@ static __always_inline void __mwaitx(u32 eax, u32 ebx, u32 ecx)
 {
 	/* No MDS buffer clear as this is AMD/HYGON only */
 
-	/* "mwaitx %eax, %ebx, %ecx;" */
-	asm volatile(".byte 0x0f, 0x01, 0xfb;"
+	/* "mwaitx %eax, %ebx, %ecx" */
+	asm volatile(".byte 0x0f, 0x01, 0xfb"
 		     :: "a" (eax), "b" (ebx), "c" (ecx));
 }
 
@@ -133,13 +133,13 @@ static __always_inline void mwait_idle_with_hints(unsigned long eax, unsigned lo
  */
 static inline void __tpause(u32 ecx, u32 edx, u32 eax)
 {
-	/* "tpause %ecx, %edx, %eax;" */
+	/* "tpause %ecx, %edx, %eax" */
 	#ifdef CONFIG_AS_TPAUSE
-	asm volatile("tpause %%ecx\n"
+	asm volatile("tpause %%ecx"
 		     :
 		     : "c"(ecx), "d"(edx), "a"(eax));
 	#else
-	asm volatile(".byte 0x66, 0x0f, 0xae, 0xf1\t\n"
+	asm volatile(".byte 0x66, 0x0f, 0xae, 0xf1"
 		     :
 		     : "c"(ecx), "d"(edx), "a"(eax));
 	#endif
-- 
2.42.0


  parent reply	other threads:[~2025-04-02 18:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 18:08 [PATCH -tip 1/4] x86/idle: Fix argument type for MONITOR{,X} and MWAIT{,X} instructions Uros Bizjak
2025-04-02 18:08 ` [PATCH -tip 2/4] x86/idle: Use MONITOR and MWAIT mnemonics in <asm/mwait.h> Uros Bizjak
2025-04-02 20:43   ` [tip: x86/mm] " tip-bot2 for Uros Bizjak
2025-04-03 15:28   ` [PATCH -tip 2/4] " Andy Shevchenko
2025-04-03 15:30     ` Andy Shevchenko
2025-04-03 15:33       ` Ingo Molnar
2025-04-03 15:41         ` Andy Shevchenko
2025-04-02 18:08 ` Uros Bizjak [this message]
2025-04-02 20:43   ` [tip: x86/mm] x86/idle: Remove .s output beautifying delimiters from simpler asm() templates tip-bot2 for Uros Bizjak
2025-04-03 11:27   ` tip-bot2 for Uros Bizjak
2025-04-02 18:08 ` [PATCH -tip 4/4] x86/idle: Remove CONFIG_AS_TPAUSE Uros Bizjak
2025-04-02 20:43   ` [tip: x86/mm] " tip-bot2 for Uros Bizjak
2025-04-02 20:55   ` tip-bot2 for Uros Bizjak
2025-04-03 11:27   ` tip-bot2 for Uros Bizjak
2025-04-02 20:43 ` [tip: x86/mm] x86/idle: Standardize argument types for MONITOR{,X} and MWAIT{,X} instruction wrappers on 'u32' tip-bot2 for Uros Bizjak
2025-04-02 23:26   ` Andrew Cooper
2025-04-02 20:48 ` [PATCH -tip 1/4] x86/idle: Fix argument type for MONITOR{,X} and MWAIT{,X} instructions Ingo Molnar
2025-04-02 21:18   ` Uros Bizjak

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=20250402180827.3762-3-ubizjak@gmail.com \
    --to=ubizjak@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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.