mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>
Subject: Re: [PATCH -tip v3 3/4] x86/segment: Use ASM_INPUT_RM in __loadsegment_fs()
Date: Fri, 13 Mar 2026 18:46:28 -0700	[thread overview]
Message-ID: <20260314014628.GA1012212@ax162> (raw)
In-Reply-To: <20260312215916.258176-3-ubizjak@gmail.com>

On Thu, Mar 12, 2026 at 10:58:57PM +0100, Uros Bizjak wrote:
> Use the ASM_INPUT_RM macro in __loadsegment_fs() to work around clang
> problems with "rm" asm constraint. clang seems to always chose the
> memory input, while it is almost always the worst choice.
> 
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Acked-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>

Acked-by: Nathan Chancellor <nathan@kernel.org>

> Cc: Thomas Gleixner <tglx@kernel.org>
> 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>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
> Cc: Bill Wendling <morbo@google.com>
> Cc: Justin Stitt <justinstitt@google.com>
> ---
>  arch/x86/include/asm/segment.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
> index 3fe3a310844c..0f4283dcd0c4 100644
> --- a/arch/x86/include/asm/segment.h
> +++ b/arch/x86/include/asm/segment.h
> @@ -335,7 +335,7 @@ static inline void __loadsegment_fs(unsigned short value)
>  
>  		     _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_CLEAR_FS)
>  
> -		     : : "rm" (value) : "memory");
> +		     : : ASM_INPUT_RM (value) : "memory");
>  }
>  
>  /* __loadsegment_gs is intentionally undefined.  Use load_gs_index instead. */
> -- 
> 2.53.0
> 

  reply	other threads:[~2026-03-14  1:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 21:58 [PATCH -tip v3 1/4] x86/fsgsbase: Remove unnecessary "memory" clobbers from FS/GS base accessors Uros Bizjak
2026-03-12 21:58 ` [PATCH -tip v3 2/4] x86/segment: Remove unnecessary memory clobber from savesegment() Uros Bizjak
2026-03-12 21:58 ` [PATCH -tip v3 3/4] x86/segment: Use ASM_INPUT_RM in __loadsegment_fs() Uros Bizjak
2026-03-14  1:46   ` Nathan Chancellor [this message]
2026-03-12 21:58 ` [PATCH -tip v3 4/4] x86/segment: Implement loadsegment()/savesegment() macros with static inline helpers 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=20260314014628.GA1012212@ax162 \
    --to=nathan@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morbo@google.com \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    --cc=ubizjak@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®