wangchdo commented on code in PR #16892: URL: https://github.com/apache/nuttx/pull/16892#discussion_r2297565989
########## arch/arm/src/armv8-r/arm_doirq.c: ########## @@ -113,14 +113,25 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) void up_irqinitialize(void) { - /* The following operations need to be atomic, but since this function is - * called early in the initialization sequence, we expect to have exclusive - * access to the GIC. - */ +#ifdef CONFIG_SMP + if (up_cpu_index() == 0) + { +#endif + /* Initialize GICDăGICRD and GIC cpu interface for cpu0 */ - /* Initialize the Generic Interrupt Controller (GIC) for CPU0 */ + arm_gic_initialize(); +#ifdef CONFIG_SMP + gicd_ready = 1; + } + else + { + /* For other CPUs, we will only initialize GICRD and + * GIC cpu interface. + */ - arm_gic_initialize(); /* Initialization common to all CPUs */ + arm_gic_secondary_init(); Review Comment: I see the nuttx call sequence: nx_start --> irq_initialize -->up_irqinitialize (every core will call nx_start) and in arm/src/armv8-r: up_irqinitialize-->arm_gic_initialize this should be a bug for armv8-r porting, i will see how to fix this according to how arm64_gic_secondary_init get called. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org