lkml.org 
[lkml]   [2019]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] x86/cpu/hygon: Fix phys_proc_id calculation logic for multi-die processor
From
Date
On 2019/3/23 16:59, Borislav Petkov wrote:
> On Sat, Mar 23, 2019 at 10:13:39AM +0800, Pu Wen wrote:
>> Current physical id is computed via "phys_proc_id = initial_apicid >>
>> bits".
>>
>> For 4-Die 2 socket system, the physical id of socket 2 is:
>> initial_apicid >> bits = 0b1xxxxxx >> 6 = 1.
>> The result is true.
>>
>> But for 2-Die 2 socket system, the physical id of socket 2 is:
>> initial_apicid >> bits = 0b10xxxxx >> 5 = 2,
>> and for 1-Die 2 socket system, the physical id of socket 2 is:
>> initial_apicid >> bits = 0b100xxxx >> 4 = 4.
>> The results are not correct any more.
>>
>> So the adjustment for the 1-Die/2-Die 2 socket system is needed.
>> And just use ApicId[6], which already defined the right thing, as the
>> socket ID.
>
> I understand all that. But let me repeat my question:
>
> So why do you need to do something different than what AMD does?
>
> You said you're programming the initial APIC ID the same as AMD. So why
> doesn't this need to be changed in AMD code too but only for hygon?

Because AMD doesn't have 2-Socket system with 1-Die/2-Die processors(see
reference [2]). So it will return the right result when getting physical
ID in AMD system.

[2] https://www.amd.com/en/products/specifications/processors

--
Regards,
Pu Wen

\
 
 \ /
  Last update: 2019-03-23 12:00    [W:0.057 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site