[PATCH] Fix the CPU count calculation error.

zhengxiaojun 17935334 at qq.com
Fri Apr 19 06:58:08 UTC 2024


Fix the CPU count calculation error.

Signed-off-by: zhengxiaojun <jameszxj at gmail.com>
---
  bsps/shared/dev/irq/arm-gicv3.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/shared/dev/irq/arm-gicv3.c 
b/bsps/shared/dev/irq/arm-gicv3.c
index 958b1061bd..6422a191f1 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -309,7 +309,7 @@ uint32_t arm_gic_irq_processor_count(void)
      int i;

      /* Assume that an interrupt export port exists */
-    cpu_count = 0;
+    cpu_count = 1;

      for (i = 0; i < CPU_MAXIMUM_PROCESSORS; ++i) {
        volatile gic_redist *redist = gicv3_get_redist(i);
-- 
2.42.0



More information about the devel mailing list