[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0o6f8lm.ffs@tglx>
Date: Mon, 14 Aug 2023 08:20:37 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: "Zhang, Rui" <rui.zhang@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "Gross, Jurgen" <jgross@...e.com>,
"mikelley@...rosoft.com" <mikelley@...rosoft.com>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"ray.huang@....com" <ray.huang@....com>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
"Sivanich, Dimitri" <dimitri.sivanich@....com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>
Subject: Re: [patch V3 23/40] x86/cpu: Provide cpu_init/parse_topology()
On Sun, Aug 13 2023 at 16:36, Thomas Gleixner wrote:
> On Sun, Aug 13 2023 at 13:30, Rui Zhang wrote:
>>> My understanding is that, to ensure a package scope unique core_id,
>>> rather than Module/Tile scope unique, what is really needed here is
>>> something like,
>>>>
>>> apicid >>= x86_topo_system.dom_shifts[SMT];
>>> c->topo.core_id = apicid & (x86_topo_system.dom_size[PACKAGE]
>>> - 1);
Actually it needs to be:
apicid &= (1U << x86_topo_system.dom_shifts[TOPO_PKG_DOMAIN]) - 1;
c->topo.core_id = apicid >> x86_topo_system.dom_shifts[TOPO_SMT_DOMAIN];
because otherwise you shift the lowest package ID bit into the result.
Powered by blists - more mailing lists