linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] arm64: topology: Initialise default topology state immediately
Date: Fri,  2 May 2014 13:38:28 -0700	[thread overview]
Message-ID: <1399063112-16917-3-git-send-email-broonie@kernel.org> (raw)
In-Reply-To: <1399063112-16917-1-git-send-email-broonie@kernel.org>

From: Mark Brown <broonie@linaro.org>

As a legacy of the way 32 bit ARM did things the topology code uses a null
topology map by default and then overwrites it by mapping cores with no
information to a cluster by themselves later. In order to make it simpler
to reset things as part of recovering from parse failures in firmware
information directly set this configuration on init. A core will always be
its own sibling so there should be no risk of confusion with firmware
provided information.

Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 arch/arm64/kernel/topology.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index 3e06b0b..ff662b2 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -43,9 +43,6 @@ static void update_siblings_masks(unsigned int cpuid)
 		 * reset it to default behaviour
 		 */
 		pr_debug("CPU%u: No topology information configured\n", cpuid);
-		cpuid_topo->core_id = 0;
-		cpumask_set_cpu(cpuid, &cpuid_topo->core_sibling);
-		cpumask_set_cpu(cpuid, &cpuid_topo->thread_sibling);
 		return;
 	}
 
@@ -87,9 +84,12 @@ void __init init_cpu_topology(void)
 		struct cpu_topology *cpu_topo = &cpu_topology[cpu];
 
 		cpu_topo->thread_id = -1;
-		cpu_topo->core_id =  -1;
+		cpu_topo->core_id = 0;
 		cpu_topo->cluster_id = -1;
+
 		cpumask_clear(&cpu_topo->core_sibling);
+		cpumask_set_cpu(cpu, &cpu_topo->core_sibling);
 		cpumask_clear(&cpu_topo->thread_sibling);
+		cpumask_set_cpu(cpu, &cpu_topo->thread_sibling);
 	}
 }
-- 
1.9.2

  parent reply	other threads:[~2014-05-02 20:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 20:38 [PATCH 0/6] arm64: topology: DT and MPIDR support Mark Brown
2014-05-02 20:38 ` [PATCH 1/6] arm64: sched: Remove unused mc_capable() and smt_capable() Mark Brown
2014-05-02 20:38 ` Mark Brown [this message]
2014-05-02 20:38 ` [PATCH 3/6] arm64: topology: Add support for topology DT bindings Mark Brown
2014-05-02 20:38 ` [PATCH 4/6] arm64: topology: add MPIDR-based detection Mark Brown
2014-05-16 16:34   ` Sudeep Holla
2014-05-16 18:39     ` Mark Brown
2014-05-19  9:57       ` Sudeep Holla
2014-05-19 10:54         ` Lorenzo Pieralisi
2014-05-19 12:33           ` Mark Brown
2014-05-19 14:13             ` Lorenzo Pieralisi
2014-05-19 16:12               ` Mark Brown
2014-05-19 17:15                 ` Lorenzo Pieralisi
2014-05-19 18:39                   ` Mark Brown
2014-05-27 23:49                   ` Zi Shen Lim
2014-05-19 12:14         ` Mark Brown
2014-05-02 20:38 ` [PATCH 5/6] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-05-02 20:38 ` [PATCH 6/6] arm64: topology: Provide relative power numbers for cores 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=1399063112-16917-3-git-send-email-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).