msi_domain_alloc_irq_at(9)
msi_domain_alloc_irq_at(9)
okay so bestie, this one is straight from the Kernel API Manual β¨ and it's literally about grabbing an interrupt from a MSI interrupt domain β either at a specific index you pick, or at the next free one. iconic behavior tbh π
β¨ NAME β¨
msi_domain_alloc_irq_at β Allocate an interrupt from a MSI interrupt domain at a given index β or at the next free index π¦
π SYNOPSIS π
here's the signature, character-for-character, no cap:
struct msi_map msi_domain_alloc_irq_at (struct device *dev , unsigned
int domid , unsigned int index , const struct irq_affinity_desc *affdesc
, union msi_instance_cookie *icookie );
π§ ARGUMENTS π§
devβ Pointer to device struct of the device for which the interrupts are allocated. like, the device we're doing all this for πdomidβ Id of the interrupt domain to operate on.indexβ Index for allocation. Ifindex == MSI_ANY_INDEXthe allocation uses the next free index. periodt β¨affdescβ Optional pointer to an interrupt affinity descriptor structure.icookieβ Optional pointer to a domain specific per instance cookie. If non-NULL the content of the cookie is stored inmsi_desc::data. Must be NULL for MSI-X allocations π¨
π¨ bestie, listen: icookie Must be NULL for MSI-X allocations. that part is not a vibe suggestion, it's a hard rule π
πΈ DESCRIPTION πΈ
This requires a MSI interrupt domain which lets the core code manage the MSI descriptors.
On success msi_map::index contains the allocated index number and msi_map::virq the corresponding Linux interrupt number π
On failure msi_map::index contains the error code and msi_map::virq is 0.
π RETURN π
struct msi_map β that's the return type, bestie π«Ά
π SEE ALSO π
go read these too, iykyk:
- Kernel file
./kernel/irq/msi.c struct msi_device_data(9)struct msi_ctrl(9)msi_alloc_desc(9)msi_domain_insert_msi_desc(9)msi_domain_free_msi_descs_range(9)msi_domain_add_simple_msi_descs(9)msi_setup_device_data(9)__msi_lock_descs(9)__msi_unlock_descs(9)msi_domain_first_desc(9)msi_next_desc(9)msi_domain_get_virq(9)msi_device_populate_sysfs(9)msi_device_destroy_sysfs(9)msi_domain_set_affinity(9)msi_create_irq_domain(9)msi_create_parent_irq_domain(9)msi_parent_init_dev_msi_info(9)msi_create_device_irq_domain(9)msi_remove_device_irq_domain(9)msi_match_device_irq_domain(9)msi_domain_alloc_irqs_range_locked(9)msi_domain_alloc_irqs_range(9)msi_domain_alloc_irqs_all_locked(9)msi_device_domain_alloc_wired(9)msi_domain_free_irqs_range_locked(9)msi_domain_free_irqs_range(9)msi_domain_free_irqs_all_locked(9)msi_domain_free_irqs_all(9)msi_device_domain_free_wired(9)msi_get_domain_info(9)msi_device_has_isolated_msi(9)
okay bye bestie π β source/version: ./kernel/irq Β· date: October 2026 Β· mwah π
π¦ 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