Merge pull request #1340 from Andre-ARM/sec-irqs-fixes

Fix support for systems without secure interrupts
This commit is contained in:
Dimitris Papastamos 2018-05-17 14:35:34 +01:00 committed by GitHub
commit eda9eadebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -178,9 +178,6 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/* The platform should provide a list of secure interrupts */
assert(plat_driver_data->g0_interrupt_array);
/*
* If there are no interrupts of a particular type, then the
* number of interrupts of that type should be 0 and vice-versa.
@ -195,8 +192,8 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
WARN("Please migrate to using an interrupt_prop_t array\n");
}
#else
assert(plat_driver_data->interrupt_props != NULL);
assert(plat_driver_data->interrupt_props_num > 0);
assert(plat_driver_data->interrupt_props_num > 0 ?
plat_driver_data->interrupt_props != NULL : 1);
#endif
/* Ensure that this is a GICv2 system */

View File

@ -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];

View File

@ -103,8 +103,8 @@ void gicv3_driver_init(const gicv3_driver_data_t *plat_driver_data)
WARN("Please migrate to using interrupt_prop_t arrays\n");
}
#else
assert(plat_driver_data->interrupt_props != NULL);
assert(plat_driver_data->interrupt_props_num > 0);
assert(plat_driver_data->interrupt_props_num > 0 ?
plat_driver_data->interrupt_props != NULL : 1);
#endif
/* Check for system register support */