diff options
author | Andre Przywara <andre.przywara@arm.com> | 2017-11-09 12:08:00 -0600 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2018-04-03 16:45:10 +0100 |
commit | 205cf6e7a52bc006cb625060b1dafcbd3d2a0d76 (patch) | |
tree | 508370223f841ba572c9e2d51f7a51094d46a8cf /drivers/arm/gic/v3/gicv3_helpers.c | |
parent | 9d6d800d13fe18acf6a759c00ae981eb437eff1f (diff) | |
download | trusted-firmware-a-205cf6e7a52bc006cb625060b1dafcbd3d2a0d76.tar.gz |
gicv3: Fix support for systems without secure interrupts
Accessing the interrupt_props array only happens inside a loop over
interrupt_props_num, so the GICv3 driver can cope with no secure
interrupts. This allows us to relax the asserts that insists on
a non-NULL interrupt_props pointer and at least one secure interrupt.
This enables GICv3 platforms which have no need for a secure interrupt.
This only covers the non-deprecated code paths.
Change-Id: I49db291906512f56af065772f69acb281dfbdcfb
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'drivers/arm/gic/v3/gicv3_helpers.c')
-rw-r--r-- | drivers/arm/gic/v3/gicv3_helpers.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/arm/gic/v3/gicv3_helpers.c b/drivers/arm/gic/v3/gicv3_helpers.c index 69c6951281..020ec1b635 100644 --- a/drivers/arm/gic/v3/gicv3_helpers.c +++ b/drivers/arm/gic/v3/gicv3_helpers.c @@ -433,8 +433,7 @@ unsigned int gicv3_secure_spis_configure_props(uintptr_t gicd_base, unsigned int ctlr_enable = 0; /* Make sure there's a valid property array */ - assert(interrupt_props != NULL); - assert(interrupt_props_num > 0); + assert(interrupt_props_num > 0 ? interrupt_props != NULL : 1); for (i = 0; i < interrupt_props_num; i++) { current_prop = &interrupt_props[i]; @@ -556,8 +555,7 @@ unsigned int gicv3_secure_ppi_sgi_configure_props(uintptr_t gicr_base, unsigned int ctlr_enable = 0; /* Make sure there's a valid property array */ - assert(interrupt_props != NULL); - assert(interrupt_props_num > 0); + assert(interrupt_props_num > 0 ? interrupt_props != NULL : 1); for (i = 0; i < interrupt_props_num; i++) { current_prop = &interrupt_props[i]; |