Ouss4 commented on pull request #5336: URL: https://github.com/apache/incubator-nuttx/pull/5336#issuecomment-1042711844
> I have modify up_enable_irq with this patch That's the part I was referring to as going to be a bit messy. :) It's just because we are going to treat the software interrupt as a special case compared to the rest of interrupts. However, I think it would be a bit less messier if we enabled the CPU interrupt without using `up_enable_irq` and directly calling `xtensa_enable_cpuint` for both CPUs. > So my question is, we must find an elegant way, to solve g_irqmap must be g_irqmap[CONFIG_SMP_NCPUS] for internal interrupts. I agree that it needs some work. The original idea of having the same map was to be able to enable/disable internal CPU interrupts from a different CPU. When one CPU enabled an interrupt the same CPU needed to disable that interrupt. This was done using an inter CPU interrupt as is done for the CXD56 chip. However, that part was removed and peripheral interrupts are only controlled by the interrupt matrix. So I don't think right now we need to map the IRQ to a CPU+CPU interrupt anymore when it comes to internal interrupts. I think what you are suggesting could work and make things a bit simpler. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
