mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
	Brian Gerst <brgerst@gmail.com>, Juergen Gross <jgross@suse.com>,
	Rik van Riel <riel@surriel.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip: x86/mm] x86/idle: Standardize argument types for MONITOR{,X} and MWAIT{,X} instruction wrappers on 'u32'
Date: Thu, 3 Apr 2025 00:26:59 +0100	[thread overview]
Message-ID: <9ba2f0ac-eb06-4437-8662-441da7e168c7@citrix.com> (raw)
In-Reply-To: <174362663333.14745.17539175188705861090.tip-bot2@tip-bot2>

On 02/04/2025 9:43 pm, tip-bot2 for Uros Bizjak wrote:
> The following commit has been merged into the x86/mm branch of tip:
>
> Commit-ID:     1ae899e413105aa81068d0282ab6e22974891d74
> Gitweb:        https://git.kernel.org/tip/1ae899e413105aa81068d0282ab6e22974891d74
> Author:        Uros Bizjak <ubizjak@gmail.com>
> AuthorDate:    Wed, 02 Apr 2025 20:08:05 +02:00
> Committer:     Ingo Molnar <mingo@kernel.org>
> CommitterDate: Wed, 02 Apr 2025 22:26:17 +02:00
>
> x86/idle: Standardize argument types for MONITOR{,X} and MWAIT{,X} instruction wrappers on 'u32'
>
> MONITOR and MONITORX expect 32-bit unsigned integer arguments in the %ecx
> and %edx registers. MWAIT and MWAITX expect 32-bit usigned int
> argument in %eax and %ecx registers.
>
> Some of the helpers around these instructions in <asm/mwait.h> are using
> too wide types (long), standardize on u32 instead that makes it clear that
> this is a hardware ABI.
>
> [ mingo: Cleaned up the changelog. ]
>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>

Something I noticed while looking over this is that you want to push the
u32's up into the callers too.

mwait_idle_with_hints() with have (marginally) better code gen by
swapping it's unsigned longs for u32's.

~Andrew

  reply	other threads:[~2025-04-02 23:27 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 ` [PATCH -tip 3/4] x86/idle: Remove unneeded delimiters from asm templates Uros Bizjak
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 [this message]
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=9ba2f0ac-eb06-4437-8662-441da7e168c7@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=brgerst@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=riel@surriel.com \
    --cc=torvalds@linux-foundation.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®