]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
arm/irq: skip action availability check for non-debug build
authorAndrii Anisov <andrii_anisov@epam.com>
Wed, 12 Dec 2018 18:20:55 +0000 (20:20 +0200)
committerJulien Grall <julien.grall@arm.com>
Fri, 14 Dec 2018 15:25:35 +0000 (15:25 +0000)
Under desc->lock taken:
An IRQ with _IRQ_GUEST flag set always has an action.
An IRQ with _IRQ_DISABLED flag cleared always has an action.
Those flags checks cover all accesses to desc->action in do_IRQ,
so we can skip desc->action check in non-debug build.
Keep in place for debug build to help diagnostics potential
misconfiguration.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/irq.c

index d6a0273d7a511c189094f558a515596965889815..4a02cc1eba9d7502fb77b970f4f09bdddaccf6ce 100644 (file)
@@ -209,12 +209,14 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq)
     spin_lock(&desc->lock);
     desc->handler->ack(desc);
 
+#ifndef NDEBUG
     if ( !desc->action )
     {
         printk("Unknown %s %#3.3x\n",
                is_fiq ? "FIQ" : "IRQ", irq);
         goto out;
     }
+#endif
 
     if ( test_bit(_IRQ_GUEST, &desc->status) )
     {