STRUCT MPIC(9)
π struct mpic(9) β the MPIC private data structure, bestie π
okay so this is a page from the Kernel API Manual, and it's literally all about struct mpic β the MPIC private data structure. yes, the actual struct, the whole thing, every single member, no gatekeeping here π«Ά
β¨ NAME β¨
struct mpic β the MPIC private data structure. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
here's the whole struct, character for character, do not touch, do not "clean it up", just read it:
struct mpic {
void __iomem *base;
void __iomem *per_cpu;
int parent_irq;
struct irq_domain *domain;
#ifdef CONFIG_SMP;
struct irq_domain *ipi_domain;
#endif;
#ifdef CONFIG_PCI_MSI;
struct irq_domain *msi_inner_domain;
unsigned long msi_used[BITS_TO_LONGS( PCI_MSI_FULL_DOORBELL_NR)];
struct mutex msi_lock;
phys_addr_t msi_doorbell_addr;
u32 msi_doorbell_mask;
unsigned int msi_doorbell_start, msi_doorbell_size;
#endif;
u32 doorbell_mask;
};
like, notice the #ifdef CONFIG_SMP; and #ifdef CONFIG_PCI_MSI; with the trailing semicolons?? iconic, slightly cursed, but we're not changing it. periodt.
π Members π
okay bestie, member-by-member tour, let's go π¦
baseβ MPIC registers base address. the home base, the main character energy β¨per_cpuβ per-CPU registers base address. one for every CPU, because sharing is not always caring πparent_irqβ parent IRQ if MPIC is not top-level interrupt controller. like, if MPIC isn't the boss of the interrupt chain, this is who it answers to πdomainβ MPIC main interrupt domain. the big one, the main domain πipi_domainβ IPI domain. (this one lives inside#ifdef CONFIG_SMP, iykyk)msi_inner_domainβ MSI inner domain. the domain inside the domain πmsi_usedβ bitmap of used MSI numbers. lowkey a whole tracking system for who's taken πmsi_lockβ mutex serializing access tomsi_used. no chaos allowed, only one at a time πmsi_doorbell_addrβ physical address of MSI doorbell register. ring ring, it's an interrupt πmsi_doorbell_maskβ mask of available doorbell bits for MSIs. and bestie, it's eitherPCI_MSI_DOORBELL_MASKorPCI_MSI_FULL_DOORBELL_MASK, no in-between π―msi_doorbell_startβ first set bit inmsi_doorbell_mask. first out the door, fr fr βmsi_doorbell_sizeβ number of set bits inmsi_doorbell_mask. count 'em up π₯doorbell_maskβ doorbell mask of MSIs and IPIs, stored on suspend, restored on resume. like a little nap that saves state, obsessed π
real talk: themsi_inner_domainthroughmsi_doorbell_sizecrew only exist under#ifdef CONFIG_PCI_MSI, andipi_domainonly under#ifdef CONFIG_SMP. anddoorbell_masksits outside both, always present, always thriving π
π§ SEE ALSO π§
- Kernel file
./drivers/irqchip/irq-armada-370-xp.cβ go read it, tell me everything π
okay and finally, the cute sign-off: this little masterpiece comes to you from ./drivers/irqchip, dated October 2026. slay, go configure your interrupts responsibly πΈππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms