kfd_mem_dmaunmap_sg_bo(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to the Kernel API Manual page for kfd_mem_dmaunmap_sg_bo(9) β€” yes, the function name is right there in the title, and this is its whole vibe. πŸ’…

🌸 NAME 🌸

kfd_mem_dmaunmap_sg_bo β€” Free DMA mapped sg_table of DOORBELL or MMIO BO. Periodt. πŸ’–

✨ SYNOPSIS ✨

void kfd_mem_dmaunmap_sg_bo (struct kgd_mem *mem , struct
       kfd_mem_attachment *attachment );

πŸŽ€ ARGUMENTS πŸŽ€

  • mem β€” SG BO of the DOORBELL or MMIO resource on the owning device. That's the BO in question, bestie.
  • attachment β€” Virtual address attachment of the BO on accessing device. It's the attachment doing the accessing-device thing. πŸ¦‹

πŸ’… DESCRIPTION πŸ’…

Okay so this method performs the following steps, and yes, there are literally two:

  • Signal TTM to mark memory pointed to by BO as GPU inaccessible β€” TTM gets the signal, the memory gets marked inaccessible to the GPU. Slay.
  • Free SG Table that is used to encapsulate DMA mapped memory of peer device's DOORBELL or MMIO memory β€” the SG Table gets freed, because it was encapsulating that DMA mapped peer-device DOORBELL or MMIO memory. Iconic cleanup behavior. 🧚

This method is invoked in the following contexts:

  • UNMapping of DOORBELL or MMIO BO on a device having access to its memory
  • Eviction of DOOREBELL or MMIO BO on device having access to its memory
Yes, DOOREBELL β€” that's exactly what the page says, and we are not fixing it, we are respecting it. πŸ™ˆ

🌈 RETURN 🌈

void β€” no return value, bestie. It does the thing and exits the chat. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c, plus the whole friend group:


πŸŽ€ That's the whole page! Footer cuteness: the source/version vibes point at ./drivers/gpu/drm/amd/amdgpu, the date is October 2026, and the page is kfd_mem_dmaunmap_sg_bo(9). Bye bestie, go unmap those sg BOs πŸ’–βœ¨

πŸ“¦ where this page comes from