diff options
Diffstat (limited to 'plat')
-rw-r--r-- | plat/fvp/aarch64/fvp_common.c | 7 | ||||
-rw-r--r-- | plat/juno/aarch64/juno_common.c | 11 |
2 files changed, 8 insertions, 10 deletions
diff --git a/plat/fvp/aarch64/fvp_common.c b/plat/fvp/aarch64/fvp_common.c index fcda2a87..ddaacbaf 100644 --- a/plat/fvp/aarch64/fvp_common.c +++ b/plat/fvp/aarch64/fvp_common.c @@ -115,7 +115,7 @@ const mmap_region_t fvp_mmap[] = { }; #endif -CASSERT((sizeof(fvp_mmap)/sizeof(fvp_mmap[0])) + FVP_BL_REGIONS \ +CASSERT(ARRAY_SIZE(fvp_mmap) + FVP_BL_REGIONS \ <= MAX_MMAP_REGIONS, assert_max_mmap_regions); /* Array of secure interrupts to be configured by the gic driver */ @@ -132,9 +132,6 @@ const unsigned int irq_sec_array[] = { IRQ_SEC_SGI_7 }; -const unsigned int num_sec_irqs = sizeof(irq_sec_array) / - sizeof(irq_sec_array[0]); - /******************************************************************************* * Macro generating the code for the function setting up the pagetables as per * the platform memory map & initialize the mmu, for the given exception level @@ -326,7 +323,7 @@ void fvp_gic_init(void) plat_config.gicd_base, BASE_GICR_BASE, irq_sec_array, - num_sec_irqs); + ARRAY_SIZE(irq_sec_array)); } diff --git a/plat/juno/aarch64/juno_common.c b/plat/juno/aarch64/juno_common.c index 6ea0b155..371323e7 100644 --- a/plat/juno/aarch64/juno_common.c +++ b/plat/juno/aarch64/juno_common.c @@ -114,7 +114,7 @@ static const mmap_region_t juno_mmap[] = { }; #endif -CASSERT((sizeof(juno_mmap)/sizeof(juno_mmap[0])) + JUNO_BL_REGIONS \ +CASSERT(ARRAY_SIZE(juno_mmap) + JUNO_BL_REGIONS \ <= MAX_MMAP_REGIONS, assert_max_mmap_regions); /* Array of secure interrupts to be configured by the gic driver */ @@ -136,9 +136,6 @@ const unsigned int irq_sec_array[] = { IRQ_SEC_SGI_7 }; -const unsigned int num_sec_irqs = sizeof(irq_sec_array) / - sizeof(irq_sec_array[0]); - /******************************************************************************* * Macro generating the code for the function setting up the pagetables as per * the platform memory map & initialize the mmu, for the given exception level @@ -211,5 +208,9 @@ uint64_t plat_get_syscnt_freq(void) void plat_gic_init(void) { - arm_gic_init(GICC_BASE, GICD_BASE, 0, irq_sec_array, num_sec_irqs); + arm_gic_init(GICC_BASE, + GICD_BASE, + 0, + irq_sec_array, + ARRAY_SIZE(irq_sec_array)); } |