[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e4a791dd-5189-4f32-a229-fa93ec9d9d5d@amd.com>
Date: Thu, 11 Sep 2025 11:36:30 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>,
Jonathan Corbet <corbet@....net>, <x86@...nel.org>
CC: Naveen rao <naveen.rao@....com>, Sairaj Kodilkar <sarunkod@....com>, "H.
Peter Anvin" <hpa@...or.com>, "Peter Zijlstra (Intel)"
<peterz@...radead.org>, "Xin Li (Intel)" <xin@...or.com>, Pawan Gupta
<pawan.kumar.gupta@...ux.intel.com>, <linux-kernel@...r.kernel.org>,
<kvm@...r.kernel.org>, Mario Limonciello <mario.limonciello@....com>,
"Gautham R. Shenoy" <gautham.shenoy@....com>, Babu Moger
<babu.moger@....com>, Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
<stable@...r.kernel.org>, Naveen N Rao <naveen@...nel.org>
Subject: Re: [PATCH v5 1/4] x86/cpu/topology: Always try
cpu_parse_topology_ext() on AMD/Hygon
On 9/11/2025 10:07 AM, K Prateek Nayak wrote:
> /*
> - * In case leaf B is available, use it to derive
> - * topology information.
> + * If the extended topology leaf 0xb leaf doesn't exits,
> + * derive CORE and DIE information from the 0x8000001e leaf.
> */
> - err = detect_extended_topology(c);
> - if (!err)
> - c->x86_coreid_bits = get_count_order(c->x86_max_cores);
> + if (!has_extended_topology) {
> + c->cpu_die_id = ecx & 0xff;
Just noticed that we still need that "cpu_die_id" from 0x8000001e since
0xb on AMD does not implement the LEVEL_TYPE of DIE_TYPE (5).
> +
> + if (c->x86 >= 0x17) {
> + c->cpu_core_id = ebx & 0xff;
> +
> + if (smp_num_siblings > 1)
> + c->x86_max_cores /= smp_num_siblings;
> + }
> + }
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists