dma_buf_end_cpu_access(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dma_buf_end_cpu_access(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, we're in the Kernel API Manual today and this page is all about the closing move of a CPU access arc. she's the sequel, the cooldown, the "ok we're done here" text. let's get into it 🫢


🌸 NAME 🌸

dma_buf_end_cpu_access β€” the function you must call after you've been accessing a dma_buf from the cpu in the kernel context. she calls end_cpu_access so the exporter can do its own little exporter-specific actions πŸ’…

and a very important vibe check: coherency is only guaranteed in the specified range, for the specified access direction. no cap. don't go thinking you get coherency everywhere for free πŸ™ˆ

⭐ SYNOPSIS ⭐

int dma_buf_end_cpu_access (struct dma_buf *dmabuf , enum
dma_data_direction direction );

look at her. iconic signature. returns an int like the main character she is πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • dmabuf [in] β€” the buffer you're completing cpu access for πŸ’–
  • direction [in] β€” the direction of access 🌈

two args, both [in], both important, periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

so this is literally the terminator of the pair β€” it ends the CPU access that you started with dma_buf_begin_cpu_access. think of it as closing the tab, logging out, saying bye to the group chat 😭

she can return negative error values, and she returns 0 on success ✨

lowkey do not ignore a negative return here bestie, that's the function telling you something went sideways πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives at ./drivers/dma-buf/dma-buf.c, and here's the whole friend group β€” every single one of them, no skips:


and that's the whole page, bestie πŸ§šπŸ’œ this one's out of ./drivers/dma-buf, dated October 2026, and yes she signed off as dma_buf_end_cpu_access(9) β€” main character energy from top to bottom, as she should πŸ’…βœ¨

πŸ“¦ where this page comes from