All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sohil Mehta <sohil.mehta@intel.com>
To: Dave Hansen <dave.hansen@intel.com>,
	Suchit Karunakaran <suchitkarunakaran@gmail.com>,
	<tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
	<dave.hansen@linux.intel.com>, <hpa@zytor.com>,
	<darwi@linutronix.de>, <peterz@infradead.org>,
	<ravi.bangoria@amd.com>
Cc: <skhan@linuxfoundation.org>,
	<linux-kernel-mentees@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH v3] x86/cpu/intel: Fix the constant_tsc model check for Pentium 4s
Date: Thu, 31 Jul 2025 11:56:22 -0700	[thread overview]
Message-ID: <85164f70-b61c-454e-ad43-c5e66faca601@intel.com> (raw)
In-Reply-To: <3093fd14-d57a-4fc6-9e15-d9ce8b075b30@intel.com>

On 7/31/2025 8:57 AM, Dave Hansen wrote:

> Could we have a slightly different changelog, please? The fact that the
> logic results in the bit never getting set for P4's is IMNHO immaterial.
> This looks like a plain and simple typo, not a logical error on the
> patch author's part.
> 

I can confirm it was a typing error that led to this bogus logic.

> How about this as a changelog?
> 

The changelog is fine, except the error happened while choosing the
upper bound (INTEL_P4_WILLAMETTE instead of INTEL_P4_CEDARMILL) and
*not* the lower bound (INTEL_P4_PRESCOTT) as suggested below.

> --
> 
> Pentium 4's which are INTEL_P4_PRESCOTT (mode 0x03) and later have a
> constant TSC. This was correctly captured until fadb6f569b10
> ("x86/cpu/intel: Limit the non-architectural constant_tsc model
> checks"). In that commit, the model was transposed from 0x03 to
> INTEL_P4_WILLAMETTE, which is just plain wrong. That was presumably a
> simple typo, probably just copying and pasting the wrong P4 model.
> 
> Fix the constant TSC logic to cover all later P4 models. End at
> INTEL_P4_CEDARMILL which is the last P4 model.

Tweaked this slightly for accuracy:

Pentium 4's which are INTEL_P4_PRESCOTT (model 0x03) and later have
a constant TSC. This was correctly captured until commit fadb6f569b10
("x86/cpu/intel: Limit the non-architectural constant_tsc model checks").

In that commit, an error was introduced while selecting the last P4
model (0x06) as the upper bound. Model 0x06 was transposed to
INTEL_P4_WILLAMETTE, which is just plain wrong. That was presumably a
simple typo, probably just copying and pasting the wrong P4 model.

Fix the constant TSC logic to cover all later P4 models. End at
INTEL_P4_CEDARMILL which accurately corresponds to the last P4 model.

      parent reply	other threads:[~2025-07-31 18:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30  4:26 [PATCH v3] x86/cpu/intel: Fix the constant_tsc model check for Pentium 4s Suchit Karunakaran
2025-07-30  4:52 ` Greg KH
2025-07-30  5:35   ` Suchit Karunakaran
2025-07-30  5:55     ` Greg KH
2025-07-30  6:21       ` Suchit Karunakaran
2025-07-30 14:42 ` Sohil Mehta
2025-07-30 14:58   ` Suchit Karunakaran
2025-07-30 15:33     ` Sohil Mehta
2025-07-30 16:27       ` Suchit Karunakaran
2025-07-30 19:29         ` Sohil Mehta
2025-07-31  4:17           ` Suchit Karunakaran
2025-07-31 15:57 ` Dave Hansen
2025-07-31 17:39   ` Suchit Karunakaran
2025-07-31 18:56   ` Sohil Mehta [this message]

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=85164f70-b61c-454e-ad43-c5e66faca601@intel.com \
    --to=sohil.mehta@intel.com \
    --cc=bp@alien8.de \
    --cc=darwi@linutronix.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=suchitkarunakaran@gmail.com \
    --cc=tglx@linutronix.de \
    /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.