dma_unmap_sgtable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dma_unmap_sgtable(9) πŸ’…

okay bestie, this is from the Kernel API Manual and it's giving very specific DMA cleanup energy. let's get into it ✨

🌸 NAME 🌸

dma_unmap_sgtable β€” unmaps the given buffer for DMA. that's the whole name vibe, no cap.

πŸŽ€ SYNOPSIS πŸŽ€

void dma_unmap_sgtable (struct device *dev , struct sg_table *sgt , enum
       dma_data_direction dir , unsigned long attrs );

🫢 ARGUMENTS 🫢

  • dev β€” the device you're doing the DMA operation for. main character device energy.
  • sgt β€” the sg_table object that describes the buffer. it's literally holding the buffer description together.
  • dir β€” the DMA direction. that's it, that's the vibe.
  • attrs β€” the optional DMA attributes for the unmap operation. optional, bestie, but still important.

πŸ”₯ DESCRIPTION πŸ”₯

so this function unmaps a buffer that's described by a scatterlist stored in the sg_table object you passed in. it does that unmap for the dir DMA operation, on the dev device. after this function runs, ownership of the buffer is transferred back to the CPU domain. periodt. πŸ’…

🌈 SEE ALSO 🌈

peep the kernel file ./include/linux/dma-mapping.h, plus these besties:


bye bestie 🫢 this page came from ./include/linux, dated October 2026, and it's dma_unmap_sgtable(9) from the Kernel API Manual. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from