remap_io_sg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… remap_io_sg(9) πŸ’…

okay bestie, this is the Kernel API Manual page for remap_io_sg(9), and it is lowkey iconic. It's giving remap an IO mapping to userspace energy, with six arguments and one very real safety note. Let's go, no cap. 🫢✨


🌸 NAME 🌸

remap_io_sg β€” remap an IO mapping to userspace. That's the whole main character moment: IO mapping gets remapped to userspace. Slay. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int remap_io_sg (struct vm_area_struct *vma , unsigned long addr ,
       unsigned long size , struct scatterlist *sgl , unsigned long offset ,
       resource_size_t iobase );

πŸ’– ARGUMENTS πŸ’–

Six args, bestie. Every single one is important, so no skipping the vibe check:

  • vma β€” user vma to map to. That's the user vma you're mapping to, periodt. πŸ’œ
  • addr β€” target user address to start at. The target user address where the map starts. 🎯
  • size β€” size of map area. Literally the size of the map area. πŸ“
  • sgl β€” Start sg entry: the sg entry where the journey starts. 🧺
  • offset β€” offset from the start of the page. Just the offset from the start of the page, bestie. πŸ“
  • iobase β€” Use stored dma address offset by this address or pfn if -1. That's the rule, fr fr. 🧚

🚨 NOTE 🚨

this is only safe if the mm semaphore is held when called. Like, only safe, bestie. Hold the mm semaphore when you call this β€” the note is literally the safety rule. 😭 No cap.

πŸ‘€ SEE ALSO πŸ‘€

iykyk, go peek at those if you need the sister pages. πŸ¦‹


made with πŸ’– from ./drivers/gpu/drm/i915, dated October 2026 β€” cute sign-off, bye bestie! πŸŽ€πŸŒ·

πŸ“¦ where this page comes from