xiaoxiang781216 commented on code in PR #16892: URL: https://github.com/apache/nuttx/pull/16892#discussion_r2293661132
########## arch/arm/src/armv8-r/arm_doirq.c: ########## @@ -113,14 +113,32 @@ 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 + static volatile uint32_t gicd_ready = 0; + + if (up_cpu_index() == 0) + { +#endif + /* Initialize GICDăGICRD and GIC cpu interface for cpu0 */ + + arm_gic_initialize(); +#ifdef CONFIG_SMP + gicd_ready = 1; + } + else + { + /* For other CPUs, we will only initialize GICRD and + * GIC cpu interface. + */ - /* Initialize the Generic Interrupt Controller (GIC) for CPU0 */ + while (gicd_ready == 0) Review Comment: but why the secondary cpu start without waiting the primary cpu command? -- 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