[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-fb2aa85564f4de35d25db022ab93640f8bb51821@git.kernel.org>
Date: Thu, 8 May 2014 03:44:22 -0700
From: tip-bot for Vincent Guittot <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, grant.likely@...aro.org,
hpa@...or.com, mingo@...nel.org, broonie@...aro.org,
torvalds@...ux-foundation.org, peterz@...radead.org,
dietmar.eggemann@....com, sudeep.karkadanagesha@....com,
arnd@...db.de, linux@....linux.org.uk, robh+dt@...nel.org,
nico@...aro.org, vincent.guittot@...aro.org, tglx@...utronix.de
Subject: [tip:sched/core] sched, ARM:
Create a dedicated scheduler topology table
Commit-ID: fb2aa85564f4de35d25db022ab93640f8bb51821
Gitweb: http://git.kernel.org/tip/fb2aa85564f4de35d25db022ab93640f8bb51821
Author: Vincent Guittot <vincent.guittot@...aro.org>
AuthorDate: Fri, 11 Apr 2014 11:44:41 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 7 May 2014 13:33:52 +0200
sched, ARM: Create a dedicated scheduler topology table
Create a dedicated topology table for ARM which will create new level to
differentiate CPUs that can or not powergate independantly from others.
The patch gives an example of how to add domain that will take advantage of
SD_SHARE_POWERDOMAIN.
Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@....com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@....com>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Grant Likely <grant.likely@...aro.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mark Brown <broonie@...aro.org>
Cc: Nicolas Pitre <nico@...aro.org>
Cc: Rob Herring <robh+dt@...nel.org>
Cc: Russell King <linux@....linux.org.uk>
Cc: Sudeep KarkadaNagesha <sudeep.karkadanagesha@....com>
Cc: devicetree@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: tony.luck@...el.com
Cc: fenghua.yu@...el.com
Cc: schwidefsky@...ibm.com
Cc: cmetcalf@...era.com
Cc: benh@...nel.crashing.org
Cc: preeti@...ux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1397209481-28542-6-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/arm/kernel/topology.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 0bc94b1..71e1fec 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -185,6 +185,15 @@ const struct cpumask *cpu_coregroup_mask(int cpu)
return &cpu_topology[cpu].core_sibling;
}
+/*
+ * The current assumption is that we can power gate each core independently.
+ * This will be superseded by DT binding once available.
+ */
+const struct cpumask *cpu_corepower_mask(int cpu)
+{
+ return &cpu_topology[cpu].thread_sibling;
+}
+
static void update_siblings_masks(unsigned int cpuid)
{
struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
@@ -266,6 +275,20 @@ void store_cpu_topology(unsigned int cpuid)
cpu_topology[cpuid].socket_id, mpidr);
}
+static inline const int cpu_corepower_flags(void)
+{
+ return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN;
+}
+
+static struct sched_domain_topology_level arm_topology[] = {
+#ifdef CONFIG_SCHED_MC
+ { cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) },
+ { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
+#endif
+ { cpu_cpu_mask, SD_INIT_NAME(DIE) },
+ { NULL, },
+};
+
/*
* init_cpu_topology is called at boot when only one cpu is running
* which prevent simultaneous write access to cpu_topology array
@@ -289,4 +312,7 @@ void __init init_cpu_topology(void)
smp_wmb();
parse_dt_topology();
+
+ /* Set scheduler topology descriptor */
+ set_sched_topology(arm_topology);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists