mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-hwmon@vger.kernel.org, linux-pm@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Guenter Roeck <linux@roeck-us.net>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>
Subject: Re: [PATCH v2 07/10] x86/msr: Switch rdmsr_safe_on_cpu() users to rdmsrq_safe_on_cpu()
Date: Sun, 7 Jun 2026 08:48:30 +0200	[thread overview]
Message-ID: <f8d02c78-4681-4043-a5fa-921fa790b1b4@suse.com> (raw)
In-Reply-To: <aiUTpBrQSQIDIS8c@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2001 bytes --]

On 07.06.26 08:45, Ingo Molnar wrote:
> 
> * Jürgen Groß <jgross@suse.com> wrote:
> 
>> Okay, fine with me.
>>
>> I'll send V3 after rc1 of 7.2 as Dave suggested.
> 
> Since these are really trivial with little value in postponing
> them over a full cycle and generating conflicts, a -rc7 base
> might work as well, as long as you send them in the next 1-2 days
> or so. (Unless Dave feels strongly about the timing.)
> 
>> One final question (not directly for this series, but for a future one):
>>
>> I'd like to switch rdmsrq() from a macro to an inline function, as a macro
>> using one of its parameters as the destination for an assignment isn't
>> nice.
> 
> So basically:
> 
>    - rdmsrq(MSR_CORE_PERF_GLOBAL_CTRL, ctrl);
>    + ctrl = rdmsrq(MSR_CORE_PERF_GLOBAL_CTRL);
> 
> ? Agreed with that.
> 
>> Additionally I'd like to replace rdmsr*() use cases with rdmsrq*()
>> and wrmsr*() with wrmsrq*() (similar to the replacements done is this
>> series).
> 
> Yeah.
> 
>> The rdmsrq() transformation into a function can easily be done via a
>> coccinelle script. What would be your choice regarding the sequence doing
>> this?
>>
>> a) Start with rdmsrq() transformation into a function.
>> b) First do the rdmsr/wrmsr -> rdmsrq/wrmsrq replacements, then do the
>>     rdmsrq() transformation into a function (this will touch more code, as
>>     the initial rdmsr() use cases will be affected, too).
>> c) Leave rdmsrq() as a macro.
> 
> I'd prefer (b), because while it's technically a bit more work,
> the flow is easier to review: the rdmsr/wrmsr replacements
> basically do a:
> 
>    macro(u32, u32) =>> macro(u64)
> 
> replacement, while with (a) we do a:
> 
>    macro(u32, u32) => u64 = function()
> 
> replacement that is a bit more complex transformation and bit
> harder to review/validate at a glance. So I think it's better
> to do the two transformations separately.

Okay, thanks. Will use this approach.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2026-06-07  6:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 14:43 [PATCH v2 00/10] x86/msr: Drop 32-bit variants of *_on_cpu() MSR functions Juergen Gross
2026-06-05 14:43 ` [PATCH v2 01/10] x86/msr: Switch rdmsrl_on_cpu() users to rdmsrq_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 02/10] x86/msr: Remove rdmsrl_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 03/10] x86/msr: Switch rdmsr_on_cpu() users to rdmsrq_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 04/10] x86/msr: Remove rdmsr_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 05/10] x86/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 06/10] x86/msr: Remove wrmsr_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 07/10] x86/msr: Switch rdmsr_safe_on_cpu() users to rdmsrq_safe_on_cpu() Juergen Gross
2026-06-05 15:04   ` Dave Hansen
2026-06-06  9:51   ` Ingo Molnar
2026-06-07  6:31     ` Jürgen Groß
2026-06-07  6:45       ` Ingo Molnar
2026-06-07  6:48         ` Juergen Gross [this message]
2026-06-05 14:43 ` [PATCH v2 08/10] x86/msr: Remove rdmsr_safe_on_cpu() Juergen Gross
2026-06-05 15:05   ` Dave Hansen
2026-06-05 14:43 ` [PATCH v2 09/10] x86/msr: Switch wrmsr_safe_on_cpu() users to wrmsrq_safe_on_cpu() Juergen Gross
2026-06-05 14:43 ` [PATCH v2 10/10] x86/msr: Remove wrmsr_safe_on_cpu() Juergen Gross
2026-06-05 15:08 ` [PATCH v2 00/10] x86/msr: Drop 32-bit variants of *_on_cpu() MSR functions Dave Hansen
2026-06-05 15:09   ` Jürgen Groß

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=f8d02c78-4681-4043-a5fa-921fa790b1b4@suse.com \
    --to=jgross@suse.com \
    --cc=bp@alien8.de \
    --cc=daniel.lezcano@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lukasz.luba@arm.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=tglx@kernel.org \
    --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®