Commit 44c4c25e authored by Marc Zyngier's avatar Marc Zyngier

irqchip/gic-v3-its: Update effective affinity on VPE mapping

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 3c1cceeb
...@@ -1178,11 +1178,13 @@ static void its_map_vm(struct its_node *its, struct its_vm *vm) ...@@ -1178,11 +1178,13 @@ static void its_map_vm(struct its_node *its, struct its_vm *vm)
for (i = 0; i < vm->nr_vpes; i++) { for (i = 0; i < vm->nr_vpes; i++) {
struct its_vpe *vpe = vm->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 */ /* Map the VPE to the first possible CPU */
vpe->col_idx = cpumask_first(cpu_online_mask); vpe->col_idx = cpumask_first(cpu_online_mask);
its_send_vmapp(its, vpe, true); its_send_vmapp(its, vpe, true);
its_send_vinvall(its, vpe); its_send_vinvall(its, vpe);
irq_data_update_effective_affinity(d, cpumask_of(vpe->col_idx));
} }
} }
...@@ -2449,6 +2451,8 @@ static int its_vpe_set_affinity(struct irq_data *d, ...@@ -2449,6 +2451,8 @@ static int its_vpe_set_affinity(struct irq_data *d,
its_vpe_db_proxy_move(vpe, from, cpu); its_vpe_db_proxy_move(vpe, from, cpu);
} }
irq_data_update_effective_affinity(d, cpumask_of(cpu));
return IRQ_SET_MASK_OK_DONE; return IRQ_SET_MASK_OK_DONE;
} }
...@@ -2797,6 +2801,8 @@ static int its_vpe_irq_domain_activate(struct irq_domain *domain, ...@@ -2797,6 +2801,8 @@ static int its_vpe_irq_domain_activate(struct irq_domain *domain,
its_send_vinvall(its, vpe); its_send_vinvall(its, vpe);
} }
irq_data_update_effective_affinity(d, cpumask_of(vpe->col_idx));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment