From: Marc Zyngier <marc.zyngier@arm.com>
Date: Thu, 19 Oct 2017 10:11:34 +0100
Subject: irqchip/gic-v3-its: Update effective affinity on VPE mapping
Patch-mainline: v4.15-rc1
Git-commit: 44c4c25e3103d26bee4cc041cbf526e41975055b
References: FATE#323954
When setting the affinity of a VPE (either because we map or move
it), make sure the effective affinity is correctly reported back
to the core kernel.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Alexander Graf <agraf@suse.de>
---
drivers/irqchip/irq-gic-v3-its.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1182,11 +1182,13 @@
for (i = 0; i < vm->nr_vpes; i++) {
struct its_vpe *vpe = vm->vpes[i];
+ struct irq_data *d = irq_get_irq_data(vpe->irq);
/* Map the VPE to the first possible CPU */
vpe->col_idx = cpumask_first(cpu_online_mask);
its_send_vmapp(its, vpe, true);
its_send_vinvall(its, vpe);
+ irq_data_update_effective_affinity(d, cpumask_of(vpe->col_idx));
}
}
@@ -2471,6 +2473,8 @@
its_vpe_db_proxy_move(vpe, from, cpu);
}
+ irq_data_update_effective_affinity(d, cpumask_of(cpu));
+
return IRQ_SET_MASK_OK_DONE;
}
@@ -2656,6 +2660,8 @@
its_vpe_send_cmd(vpe, its_send_clear);
}
+ irq_data_update_effective_affinity(d, cpumask_of(vpe->col_idx));
+
return 0;
}