]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
xen/arm: gic-vgic: Fix the assert condition in vgic_connect_hw_irq
authorAndrii Anisov <andrii_anisov@epam.com>
Fri, 25 Jan 2019 17:06:02 +0000 (19:06 +0200)
committerJulien Grall <julien.grall@arm.com>
Tue, 29 Jan 2019 15:32:42 +0000 (15:32 +0000)
Currently, the assert condition in vgic_connect_hw_irq does not
correspond to the comment above and result to hit the assertion
on HW IRQ disconnection.

Fix the condition so it corresponds to the comment and allows IRQ
disconnection on debug builds.

Fixes: ec2a2f1 ("ARM: VGIC: factor out vgic_connect_hw_irq()")
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Suggested-by: Stefan Nuernberger <snu@amazon.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[julieng: Reword the commit message]
Acked-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/arm/gic-vgic.c

index 48922f55952ab17a5fab2ce3ed22cc5c7b8043fa..a3bba854dac1dd711eae05ba31ca2175c1cc3a58 100644 (file)
@@ -443,7 +443,7 @@ int vgic_connect_hw_irq(struct domain *d, struct vcpu *v, unsigned int virq,
     int ret = 0;
 
     /* "desc" is optional when we disconnect an IRQ. */
-    ASSERT(connect && desc);
+    ASSERT(!connect || desc);
 
     /* We are taking to rank lock to prevent parallel connections. */
     vgic_lock_rank(v_target, rank, flags);