summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2015-02-04 14:48:35 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:41:57 +0900
commitee3cd3fbd1c45961722c64f7da8963c86ad8bd11 (patch)
tree478c0b16f36baa3d0999b2024e157b224bea2d36 /kernel
parent9d689693034a6339256161ef701a1880115c7c6d (diff)
HMP: Restrict irq_default_affinity to hmp_slow_cpu_mask
This patch limits the default affinity mask for all irqs to the cluster of the little cpus. This patch has the positive side effect that an irq thread which has its IRQTF_RUNTHREAD set inside irq_thread() -> irq_wait_for_interrupt() will not overwrite its struct task_struct->cpus_allowed with a full cpu mask of desc->irq_data.affinity in irq_thread_check_affinity() essentially reverting patch "HMP: experimental: Force all rt tasks to start on little domain." for this irq thread. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/irqdesc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index e17a28117c04..fec632d8ef98 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -37,12 +37,20 @@ static int __init irq_affinity_setup(char *str)
}
__setup("irqaffinity=", irq_affinity_setup);
+extern struct cpumask hmp_slow_cpu_mask;
+
static void __init init_irq_default_affinity(void)
{
#ifdef CONFIG_CPUMASK_OFFSTACK
if (!irq_default_affinity)
zalloc_cpumask_var(&irq_default_affinity, GFP_NOWAIT);
#endif
+#ifdef CONFIG_SCHED_HMP
+ if (!cpumask_empty(&hmp_slow_cpu_mask)) {
+ cpumask_copy(irq_default_affinity, &hmp_slow_cpu_mask);
+ return;
+ }
+#endif
if (cpumask_empty(irq_default_affinity))
cpumask_setall(irq_default_affinity);
}