mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-20 03:05:47 +08:00
bbsps/shared/arm-gicv3: Calculate cpu_count correctly
cpu_count should be increased before exit condition.
This commit is contained in:
committed by
Amar Takhar
parent
cc34558448
commit
3211cba9f9
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user