acpi_dma_get_range(9)
β¨ acpi_dma_get_range β bestie, let's get your DMA parameters β¨
Okay so real talk, this one is from the Kernel API Manual (section 9, the kernel API girlies π
) and it's literally called acpi_dma_get_range. It's giving "small function, big job" and I'm obsessed.
πΈ NAME πΈ
acpi_dma_get_range β Get device DMA parameters. That's it, that's the whole vibe. It goes and fetches the DMA deets for a device π
π¦ SYNOPSIS π¦
int acpi_dma_get_range (struct device *dev , const struct bus_dma_region **map );
Look at her. Two arguments, one int return. Iconic behavior honestly π
π ARGUMENTS π
devβ the device you wanna configure. She's the main character here, the one getting her DMA situation sorted π«Άmapβ pointer to the DMA ranges result. Think of it as the lil basket where the answer gets dropped off π§Ί
π DESCRIPTION π
So what does she actually do? She evaluates the DMA regions, and on parsing success she returns a pointer to those DMA regions. Slay π
β οΈ But bestie, listen β on failure she does not update the passed in values. Not even a little. The values you handed in stay exactly how you left them, no cap. So don't go reading map like it's fresh data if things went sideways π
The return value, in her own words:
0on success β we ate, no crumbs π₯< 0on failure β it's giving flop, handle it π
π§ SEE ALSO π§
Kernel file ./drivers/acpi/scan.c β that's where she lives, go say hi π
And her whole friend group, the ACPI scan girlies, all linked up:
acpi_scan_drop_device(9)acpi_fetch_acpi_dev(9)acpi_get_acpi_dev(9)acpi_dma_supported(9)acpi_get_dma_attr(9)acpi_dma_configure_id(9)acpi_walk_dep_device_list(9)acpi_dev_clear_dependencies(9)acpi_dev_ready_for_enumeration(9)acpi_dev_get_next_consumer_dev(9)acpi_bus_scan(9)acpi_bus_trim(9)
π Sign-off π
That's the whole page, bestie! She lives in ./drivers/acpi, this particular glow-up is dated October 2026, and she answers to acpi_dma_get_range(9) β remember the manual section, iykyk πβ¨
Go get those DMA ranges. Periodt π π
π¦ 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