k230_docs icon indicating copy to clipboard operation
k230_docs copied to clipboard

[other]: lock-free IPCM possible?

Open jinchenglee opened this issue 6 months ago • 0 comments

Other

Hi, IPCM configures IRQ 109 (here, and here) to be reused by both directions of interrupt triggering: big core -> little core and vice versa.

There are actually four IRQs available in ipcm_platform.h:

#define IRQN_MAILBOX_CPUATOCPUB_0_INTERRUPT     (16 + 93)  // IRQ 109, currently being used. 
#define IRQN_MAILBOX_CPUATOCPUB_1_INTERRUPT     (16 + 94)
#define IRQN_MAILBOX_CPUATOCPUB_2_INTERRUPT     (16 + 95)
#define IRQN_MAILBOX_CPUATOCPUB_3_INTERRUPT     (16 + 96)

Because of reusing the single IRQ 109 (a shared resource), thus certain lock mechanism is implemented to make sure resource acquire/release to avoid race condition. However, I wonder, is a lock-free implementation do-able?

Let's say we use IRQ 109 dedicated for big -> little interrupt, and IRQ 110 dedicated for little -> big. Since the shared memory are partitioned with no overlapped usage by either core, it seems a lock-free implementation possible to make it simpler?

I guess, a more simpler question is: will any of the four IRQs (109 - 112) be able to be configured independently trigger in either direction?

jinchenglee avatar Oct 03 '25 21:10 jinchenglee