Commit-ID: 90dc7122a3090ade1ffc6452b7b912cc73562021 Gitweb: https://git.kernel.org/tip/90dc7122a3090ade1ffc6452b7b912cc73562021 Author: Marc Zyngier <marc.zyngier@xxxxxxx> AuthorDate: Fri, 10 Nov 2017 09:00:41 +0000 Committer: Marc Zyngier <marc.zyngier@xxxxxxx> CommitDate: Fri, 10 Nov 2017 09:50:36 +0000 irqchip/gic-v4: Clear IRQ_DISABLE_UNLAZY again if mapping fails Should the call to irq_set_vcpu_affinity() fail at map time, we should restore the normal lazy-disable behaviour instead of staying with the eager disable that GICv4 requires. Reported-by: Eric Auger <eric.auger@xxxxxxxxxx> Acked-by: Christoffer Dall <christoffer.dall@xxxxxxxxxx> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx> --- drivers/irqchip/irq-gic-v4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c index cd0bcc3..dba9d67 100644 --- a/drivers/irqchip/irq-gic-v4.c +++ b/drivers/irqchip/irq-gic-v4.c @@ -177,6 +177,7 @@ int its_map_vlpi(int irq, struct its_vlpi_map *map) .map = map, }, }; + int ret; /* * The host will never see that interrupt firing again, so it @@ -184,7 +185,11 @@ int its_map_vlpi(int irq, struct its_vlpi_map *map) */ irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY); - return irq_set_vcpu_affinity(irq, &info); + ret = irq_set_vcpu_affinity(irq, &info); + if (ret) + irq_clear_status_flags(irq, IRQ_DISABLE_UNLAZY); + + return ret; } int its_get_vlpi(int irq, struct its_vlpi_map *map) -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html