Linux Power Management development
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Juergen Gross <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	"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 01/32] thermal/intel: Stop using 32-bit MSR interfaces
Date: Thu, 2 Jul 2026 11:31:41 +0200	[thread overview]
Message-ID: <akYv_fhsLpTt15FI@gmail.com> (raw)
In-Reply-To: <20260629060526.3638272-2-jgross@suse.com>


* Juergen Gross <jgross@suse.com> wrote:

> -	rdmsr(MSR_IA32_THERM_INTERRUPT, l, h);
> +	rdmsrq(MSR_IA32_THERM_INTERRUPT, val.q);
>  	if (cpu_has(c, X86_FEATURE_PLN) && !int_pln_enable)
> -		wrmsr(MSR_IA32_THERM_INTERRUPT,
> -			(l | (THERM_INT_LOW_ENABLE
> -			| THERM_INT_HIGH_ENABLE)) & ~THERM_INT_PLN_ENABLE, h);
> +		val.l = (val.l | THERM_INT_LOW_ENABLE | THERM_INT_HIGH_ENABLE) &
> +			~THERM_INT_PLN_ENABLE;

This could be written as something like:

		val.l |= THERM_INT_LOW_ENABLE | THERM_INT_HIGH_ENABLE;
		val.l &= ~THERM_INT_PLN_ENABLE;

Which would be far more readable than the multi-line statement.

> +			val.l = (val.l | PACKAGE_THERM_INT_LOW_ENABLE |
> +				 PACKAGE_THERM_INT_HIGH_ENABLE) &
> +				~PACKAGE_THERM_INT_PLN_ENABLE;

Ditto.

Thanks,

	Ingo

  reply	other threads:[~2026-07-02  9:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29  6:04 [PATCH 00/32] x86/msr: Drop 32-bit MSR interfaces Juergen Gross
2026-06-29  6:04 ` [PATCH 01/32] thermal/intel: Stop using " Juergen Gross
2026-07-02  9:31   ` Ingo Molnar [this message]
2026-07-02 11:18     ` Jürgen Groß
2026-07-03 11:22   ` [PATCH v2 " Juergen Gross
2026-06-29  6:04 ` [PATCH 02/32] powercap: " Juergen Gross
2026-06-29 11:25   ` Ingo Molnar
2026-06-29 11:33     ` Jürgen Groß
2026-06-29 12:31       ` Ingo Molnar
2026-06-29 12:52         ` Jürgen Groß
2026-06-29  6:04 ` [PATCH 04/32] acpi: " Juergen Gross
2026-06-30 12:30   ` Rafael J. Wysocki (Intel)
2026-06-30 12:42     ` Jürgen Groß
2026-07-02  9:17     ` Ingo Molnar
2026-07-02 11:33       ` Rafael J. Wysocki (Intel)
2026-06-29  6:05 ` [PATCH 16/32] cpufreq: " Juergen Gross
2026-06-29 14:55   ` Zhongqiu Han
2026-06-30  6:38     ` Juergen Gross
2026-07-03 11:24   ` [PATCH v2 " Juergen Gross
2026-06-29  6:05 ` [PATCH 31/32] treewide: convert rdmsrq() from a macro to an inline function Juergen Gross
2026-06-29  6:52 ` [PATCH 00/32] x86/msr: Drop 32-bit MSR interfaces Arnd Bergmann
2026-06-29  7:01   ` Jürgen Groß
2026-06-29  8:06     ` Arnd Bergmann
2026-06-29  8:15       ` Jürgen Groß
2026-06-29  8:38         ` Arnd Bergmann
2026-06-30 20:06           ` H. Peter Anvin
2026-06-29 11:19       ` Ingo Molnar
2026-06-30 18:59         ` Sean Christopherson
2026-07-01  8:33           ` Jürgen Groß
2026-07-02 10:07           ` Ingo Molnar
2026-07-02 11:03             ` Juergen Gross

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=akYv_fhsLpTt15FI@gmail.com \
    --to=mingo@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    /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