From: Stephen Horvath <s.horvath@outlook.com.au>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/tsc: Read AMD CPU frequency from Core::X86::Msr::PStateDef
Date: Fri, 15 Aug 2025 11:53:51 +1000 [thread overview]
Message-ID: <SY4P282MB30630DE6D63A24ED9BF3E30EC534A@SY4P282MB3063.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20250814152550.GAaJ3__hIHnOBhKGWN@fat_crate.local>
Hi Borislav, Thank you very much for reviewing my patch!
On 15/8/25 01:25, Borislav Petkov wrote:
> On Wed, Aug 13, 2025 at 11:23:38AM +0000, Stephen Horvath wrote:
>> + /* The PPR defines the core multiplier as CpuFid * 25MHz */
>> + p0_freq = cpufid * 25;
>
> As someone already pointed out:
Was this pointed out publicly, or something internally? I couldn't find
any relevant TSC patches for AMD on lore when I looked previously (other
than the Secure TSC which didn't seem applicable).
>
> PPR Vol 1 for AMD Family 1Ah Model 02h C1
>
> ...
>
> MSRC001_006[4...B] [P-state [7:0]] (Core::X86::Msr::PStateDef)
>
> ...
>
> CpuFid[11:0]: core frequency ID.
>
> FFFh- <Value>*5
> 010h
>
> So we need to do per-family checks here.
Ah, good catch! I did check through the 17h and 19h PPRs, but overlooked
1Ah. At least 1Ah is simpler since there's no divisor.
>
> Not sure if that is worth it, frankly.
>
Yeah that's fair enough. I might submit a v2 with some changes next week
and leave it at that, depending on feedback from others.
Thank you again for your time reviewing this!
Steve.
prev parent reply other threads:[~2025-08-15 1:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 11:23 Stephen Horvath
2025-08-14 6:36 ` kernel test robot
2025-08-14 7:40 ` Stephen Horvath
2025-08-14 15:25 ` Borislav Petkov
2025-08-15 1:53 ` Stephen Horvath [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=SY4P282MB30630DE6D63A24ED9BF3E30EC534A@SY4P282MB3063.AUSP282.PROD.OUTLOOK.COM \
--to=s.horvath@outlook.com.au \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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®