bbsps/shared/arm-gicv3: Calculate cpu_count correctly

cpu_count should be increased before exit condition.
This commit is contained in:
zhengxiaojun
2024-08-07 15:18:18 +08:00
committed by Amar Takhar
parent cc34558448
commit 3211cba9f9

View File

@@ -322,11 +322,10 @@ uint32_t arm_gic_irq_processor_count(void)
for (i = 0; i < CPU_MAXIMUM_PROCESSORS; ++i) {
volatile gic_redist *redist = gicv3_get_redist(i);
++cpu_count;
if ((redist->icrtyper & GIC_REDIST_ICRTYPER_LAST) != 0) {
break;
}
++cpu_count;
}
}