Re: [PATCH v5 1/4] x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux