diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-11-10 04:00:41 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-11-10 04:50:36 -0500 |
commit | 90dc7122a3090ade1ffc6452b7b912cc73562021 (patch) | |
tree | e6bcdc350cb946ae945a6500e4cba0522a8934be | |
parent | 4f8413a3a799c958f7a10a6310a451e6b8aef5ad (diff) |
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@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | drivers/irqchip/irq-gic-v4.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c index cd0bcc3b7e33..dba9d67cb9c1 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) | |||
177 | .map = map, | 177 | .map = map, |
178 | }, | 178 | }, |
179 | }; | 179 | }; |
180 | int ret; | ||
180 | 181 | ||
181 | /* | 182 | /* |
182 | * The host will never see that interrupt firing again, so it | 183 | * 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) | |||
184 | */ | 185 | */ |
185 | irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY); | 186 | irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY); |
186 | 187 | ||
187 | return irq_set_vcpu_affinity(irq, &info); | 188 | ret = irq_set_vcpu_affinity(irq, &info); |
189 | if (ret) | ||
190 | irq_clear_status_flags(irq, IRQ_DISABLE_UNLAZY); | ||
191 | |||
192 | return ret; | ||
188 | } | 193 | } |
189 | 194 | ||
190 | int its_get_vlpi(int irq, struct its_vlpi_map *map) | 195 | int its_get_vlpi(int irq, struct its_vlpi_map *map) |