Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Nov 2021 11:45:36 -0400
From:      Alexander Motin <mav@FreeBSD.org>
To:        rgrimes@freebsd.org
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 6badb512a94d - main - Prefer CPUID leaf 1Fh for Intel CPU topology detection.
Message-ID:  <2eeb65b1-4f75-9c92-f885-0a9bb2b6cf99@FreeBSD.org>
In-Reply-To: <202111061516.1A6FGuAe038007@gndrsh.dnsmgr.net>
References:  <202111061516.1A6FGuAe038007@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Rodney,

On 06.11.2021 11:16, Rodney W. Grimes wrote:
>>  	/* We only support three levels for now. */
>>  	for (i = 0; ; i++) {
>> -		cpuid_count(0x0b, i, p);
>> +		cpuid_count(leaf, i, p);
>>  
>>  		bits = p[0] & 0x1f;
>>  		type = (p[2] >> 8) & 0xff;
>> @@ -412,13 +422,12 @@ topo_probe_intel_0xb(void)
>>  		if (type == 0)
>>  			break;
>>  
>> -		/* TODO: check for duplicate (re-)assignment */
>>  		if (type == CPUID_TYPE_SMT)
>>  			core_id_shift = bits;
>>  		else if (type == CPUID_TYPE_CORE)
>>  			pkg_id_shift = bits;
>> -		else
>> -			printf("unknown CPU level type %d\n", type);
> 
> Why do we loose this potential diagnostic message,

Because it is not an error and not important for average user.  New
specifications list addition of such levels as Module, Tile and Die,
meaning of which and OS use is unclear at this point.  I've actually
made the new message more informative under the bootverbose to help
later developers when the time of those types come.

> and isnt its trailing \n needed to close the probe message?
> It would need to be come an else of the if (bootverbose) if
> I am reading things correctly.

It does not close any probe message, it is a full line, so there is
nothing for "else".

>> +		else if (bootverbose)
>> +			printf("Topology level type %d shift: %d\n", type, bits);
>>  	}
>>  
>>  	if (pkg_id_shift < core_id_shift) {
>>
> 

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2eeb65b1-4f75-9c92-f885-0a9bb2b6cf99>