[COMMON] irq: Bound irq to boot cluster when multi target irq scenario.
authorSoohyun Kim <soohyuni.kim@samsung.com>
Thu, 2 Nov 2017 01:00:02 +0000 (10:00 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Mon, 14 May 2018 05:04:20 +0000 (14:04 +0900)
IRQD_GIC_MULTI_TARGET flag is enabled, All CPU can receive
interrupts. It cause increase power consumption, so we need to
limits the interrupt only to the boot cluster.

Change-Id: I9a44a07fd12220f8a2cfdd5539ccf52aec80677d
Signed-off-by: Soohyun Kim <soohyuni.kim@samsung.com>
drivers/irqchip/irq-gic.c

index fc1675505496e3021ed7eeb5effe8b0f8832a923..ae34a1ebf9ef498a624056cbfcf6f4cd27ccec15 100644 (file)
@@ -336,7 +336,10 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
                bit = 0;
                if (!cpumask_and(&temp_mask, mask_val, cpu_online_mask))
                        goto err_out;
-
+#ifndef CONFIG_SCHED_HMP
+               if (!cpumask_and(&temp_mask, &temp_mask, cpu_coregroup_mask(0)))
+                       goto err_out;
+#endif
                for_each_cpu(cpu, &temp_mask) {
                        if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
                                goto err_out;