[RFC PATCH 3/8] x86: implement arch interface for scheduler domain setup
From: dietmar . eggemann
Date: Fri Dec 13 2013 - 07:13:33 EST
From: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
This patch provides the arch_sched_domain_info array for the x86 arch.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
---
arch/x86/kernel/topology.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 649b010da00b..b9ddd4b50265 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -30,11 +30,23 @@
#include <linux/mmzone.h>
#include <linux/init.h>
#include <linux/smp.h>
+#include <linux/sched.h>
#include <linux/irq.h>
#include <asm/cpu.h>
static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);
+arch_sched_domain_info_t arch_sched_domain_info[] = {
+#ifdef CONFIG_SCHED_SMT
+ { cpu_smt_mask, SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES },
+#endif
+#ifdef CONFIG_SCHED_MC
+ { cpu_coregroup_mask, SD_SHARE_PKG_RESOURCES },
+#endif
+ { cpu_cpu_mask, SD_PREFER_SIBLING },
+ { NULL, },
+};
+
#ifdef CONFIG_HOTPLUG_CPU
#ifdef CONFIG_BOOTPARAM_HOTPLUG_CPU0
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/