acpi_dev_get_dma_resources(9)
π acpi_dev_get_dma_resources(9)
okay so bestie, welcome to the Kernel API Manual β¨ this one's a kernel function page, and honestly? it's giving "small but mighty." let's get into it π«Ά
β¨ NAME β¨
acpi_dev_get_dma_resources β get current DMA resources of a device π
πΈ SYNOPSIS πΈ
int acpi_dev_get_dma_resources (struct acpi_device *adev , struct
list_head *list );
like, that's the whole signature. copy it exactly, no cap π₯
π ARGUMENTS π
adevβ the ACPI device node you wanna get the resources for π¦listβ head of the resultant list of resources. and listen, it must be empty β no sneaky leftovers, okay? π
π DESCRIPTION π
okay so what this actually does: it evaluates the _DMA method for the device node you passed in, and then processes whatever that method spits out β¨
the resultant struct resource objects get put onto the list that list points to β and remember, that list has to be empty at the start, fr fr. they go on there as members of struct resource_entry objects π«
π¨ bestie heads up: callers of this routine should use acpi_dev_free_resource_list to free that list. don't just leave it hanging, that's not the vibe π
and the returns? on success you get the number of resources in the output list back π₯ otherwise you get an error code that reflects whatever error condition happened, and that's on periodt π
π SEE ALSO π
kernel file ./drivers/acpi/resource.c plus these iconic little functions, go check 'em out iykyk:
acpi_dev_resource_memory(9)acpi_dev_resource_io(9)acpi_dev_resource_address_space(9)acpi_dev_resource_ext_address_space(9)acpi_dev_irq_flags(9)acpi_dev_get_irq_type(9)acpi_dev_resource_interrupt(9)acpi_dev_free_resource_list(9)acpi_dev_get_resources(9)acpi_dev_get_memory_resources(9)acpi_dev_filter_resource_type(9)acpi_resource_consumer(9)
and that's the page!! π§ mwah, slay, go read the whole set π
this lil sign-off is brought to you by ./drivers/acpi, dated October 2026, and your girl acpi_dev_get_dma_resources(9) β bye bestie, drink some water and free your resource lists πππΈ
π¦ 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