mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Serhii Pievniev <spevnev16@gmail.com>, <lenb@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tools/turbostat: fix microcode patch level reading for AMD/Hygon
Date: Tue, 24 Feb 2026 09:00:48 +0530	[thread overview]
Message-ID: <c0979077-a229-4584-9ac3-747dfd96650a@amd.com> (raw)
In-Reply-To: <20260224023719.65165-1-spevnev16@gmail.com>

On 2/24/2026 8:07 AM, Serhii Pievniev wrote:
> @@ -9139,7 +9150,7 @@ void process_cpuid()
>  	if (!quiet) {
>  		fprintf(outf, "CPUID(1): family:model:stepping 0x%x:%x:%x (%d:%d:%d)", family, model, stepping, family, model, stepping);
>  		if (ucode_patch_valid)
> -			fprintf(outf, " microcode 0x%x", (unsigned int)((ucode_patch >> 32) & 0xFFFFFFFF));

Since "MSR_IA32_UCODE_REV" and "MSR_AMD64_PATCH_LEVEL" are the same,
all that essentially changes is the shift.

Can't we just 0 the shift for "authentic_amd || hygon_genuine"?

> +			fprintf(outf, " microcode 0x%llx", ucode_patch);
>  		fputc('\n', outf);
>  
>  		fprintf(outf, "CPUID(0x80000000): max_extended_levels: 0x%x\n", max_extended_level);

-- 
Thanks and Regards,
Prateek


  reply	other threads:[~2026-02-24  3:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  2:37 Serhii Pievniev
2026-02-24  3:30 ` K Prateek Nayak [this message]
2026-02-24 14:10   ` Serhii
2026-02-25  4:35     ` K Prateek Nayak
2026-02-25 18:53       ` Len Brown
2026-02-25 23:16 ` [PATCH v2] " Serhii Pievniev
2026-03-10 18:51   ` Len Brown

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=c0979077-a229-4584-9ac3-747dfd96650a@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=spevnev16@gmail.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

all inboxes | Powered by JetHome®