arch/powerpc/sysdev/mpic_msi.c
Source file repositories/reference/linux-study-clean/arch/powerpc/sysdev/mpic_msi.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/sysdev/mpic_msi.c- Extension
.c- Size
- 2352 bytes
- Lines
- 100
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/irq.hlinux/irqdomain.hlinux/of_irq.hlinux/bitmap.hlinux/msi.hasm/mpic.hasm/hw_irq.hasm/ppc-pci.hasm/msi_bitmap.hsysdev/mpic.h
Detected Declarations
function mpic_msi_reserve_hwirqfunction mpic_msi_reserve_u3_hwirqsfunction mpic_msi_reserve_u3_hwirqsfunction mpic_msi_init_allocator
Annotated Snippet
while (of_irq_parse_one(np, index++, &oirq) == 0) {
ops->xlate(mpic->irqhost, NULL, oirq.args,
oirq.args_count, &hwirq, &flags);
msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq);
}
}
return 0;
}
#else
static int __init mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
{
return -1;
}
#endif
int __init mpic_msi_init_allocator(struct mpic *mpic)
{
int rc;
rc = msi_bitmap_alloc(&mpic->msi_bitmap, mpic->num_sources,
irq_domain_get_of_node(mpic->irqhost));
if (rc)
return rc;
rc = msi_bitmap_reserve_dt_hwirqs(&mpic->msi_bitmap);
if (rc > 0) {
if (mpic->flags & MPIC_U3_HT_IRQS)
rc = mpic_msi_reserve_u3_hwirqs(mpic);
if (rc) {
msi_bitmap_free(&mpic->msi_bitmap);
return rc;
}
}
return 0;
}
Annotation
- Immediate include surface: `linux/irq.h`, `linux/irqdomain.h`, `linux/of_irq.h`, `linux/bitmap.h`, `linux/msi.h`, `asm/mpic.h`, `asm/hw_irq.h`, `asm/ppc-pci.h`.
- Detected declarations: `function mpic_msi_reserve_hwirq`, `function mpic_msi_reserve_u3_hwirqs`, `function mpic_msi_reserve_u3_hwirqs`, `function mpic_msi_init_allocator`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.