From 0478798c877d0b8f3f7a255c361febd7bfdcfbc4 Mon Sep 17 00:00:00 2001 From: Soohyun Kim Date: Thu, 2 Nov 2017 10:00:02 +0900 Subject: [PATCH] [COMMON] irq: Bound irq to boot cluster when multi target irq scenario. 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 --- drivers/irqchip/irq-gic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index fc1675505496..ae34a1ebf9ef 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -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; -- 2.20.1