mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pu Wen <puwen@hygon.cn>
To: Borislav Petkov <bp@alien8.de>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86/cpu/hygon: Fix phys_proc_id calculation logic for multi-die processor
Date: Sat, 23 Mar 2019 18:56:52 +0800	[thread overview]
Message-ID: <e181933e-775a-4597-7700-9dde8b98295f@hygon.cn> (raw)
In-Reply-To: <20190323085934.GB23698@zn.tnic>

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

  reply	other threads:[~2019-03-23 10:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 10:43 Pu Wen
2019-03-22 15:54 ` Borislav Petkov
2019-03-22 16:19   ` Pu Wen
2019-03-22 16:44     ` Borislav Petkov
2019-03-22 16:52       ` Peter Zijlstra
2019-03-23  3:00         ` Pu Wen
2019-03-23  1:48       ` Pu Wen
2019-03-23  8:57         ` Borislav Petkov
2019-03-22 17:16     ` Borislav Petkov
2019-03-23  2:13       ` Pu Wen
2019-03-23  8:59         ` Borislav Petkov
2019-03-23 10:56           ` Pu Wen [this message]
2019-03-23 11:08             ` Borislav Petkov
2019-03-23 11:11               ` Pu Wen

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=e181933e-775a-4597-7700-9dde8b98295f@hygon.cn \
    --to=puwen@hygon.cn \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®