From: Mark Brown <broonie@kernel.org>
To: Zi Shen Lim <zlim@broadcom.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: topology: add MPIDR-based detection
Date: Wed, 23 Apr 2014 11:36:48 +0100 [thread overview]
Message-ID: <20140423103648.GM12304@sirena.org.uk> (raw)
In-Reply-To: <1398217214-12204-3-git-send-email-zlim@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
On Tue, Apr 22, 2014 at 06:40:14PM -0700, Zi Shen Lim wrote:
> + /* Multiprocessor system */
> + if (mpidr & MPIDR_MT_BITMASK) {
> + /* Multi-threads per core */
> + cpuid_topo->thread_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
> + cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 1);
> + cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 2);
> + } else {
> + /* Single-thread per core */
> + cpuid_topo->thread_id = -1;
> + cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
> + cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 1);
> + }
> + }
This means that we ignore affinity level 3 and on non-MT cores we ignore
affinity level 2. That means that if it runs on some system where we do
have multiple levels of clustering (for example some future multi socket
server) or if for some reason the hardware engineers have decided to use
one of the higher affinity levels then we will incorrectly report cores
from several clusters as being part of a single cluster.
I had been intending to just combine all the bits from affinitly levels
above the CPU number into a single number until we know what to do with
them individually. We shouldn't just ignore them.
> + pr_info("CPU%u: cluster %d core %d thread %d mpidr %llx\n",
> + cpuid, cpuid_topo->cluster_id, cpuid_topo->core_id,
> + cpuid_topo->thread_id, mpidr);
> +
Catalin or Lorenzo asked for stuff like that to be taken out.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-04-23 10:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 1:40 [PATCH 0/2] arm64 topology updates Zi Shen Lim
2014-04-23 1:40 ` [PATCH 1/2] arm64, sched: Remove unused mc_capable() and smt_capable() Zi Shen Lim
2014-04-24 18:32 ` Mark Brown
2014-04-23 1:40 ` [PATCH 2/2] arm64: topology: add MPIDR-based detection Zi Shen Lim
2014-04-23 10:36 ` Mark Brown [this message]
2014-04-23 17:27 ` Zi Shen Lim
2014-04-23 18:26 ` Mark Brown
2014-04-23 19:22 ` Zi Shen Lim
2014-04-23 22:38 ` Mark Brown
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=20140423103648.GM12304@sirena.org.uk \
--to=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=will.deacon@arm.com \
--cc=zlim@broadcom.com \
/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®