gic-vgic: Drop an excessive clear_lrs
authorAndrii Anisov <andrii_anisov@epam.com>
Wed, 12 Dec 2018 18:20:54 +0000 (20:20 +0200)
committerJulien Grall <julien.grall@arm.com>
Fri, 14 Dec 2018 15:25:21 +0000 (15:25 +0000)
This action is excessive because for an invalid LR there is no need
to write another invalid value to a register. So we can skip it here,
saving a peripheral register write.
Keep clearing the LR for the DEBUG build. This would make dumped
invalid LRs be zero. That is more obvious than picking state bits
from a non-zero value.

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

index 990399cf3fbdd26ff332b2d2a6b79b33a2759f9e..48922f55952ab17a5fab2ce3ed22cc5c7b8043fa 100644 (file)
@@ -216,7 +216,9 @@ static void gic_update_one_lr(struct vcpu *v, int i)
     }
     else
     {
+#ifndef NDEBUG
         gic_hw_ops->clear_lr(i);
+#endif
         clear_bit(i, &this_cpu(lr_mask));
 
         if ( p->desc != NULL )