drm_gpusvm_for_each_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpusvm_for_each_range(9) β€” like, the whole kernel API manual vibe

okay so bestie, welcome to the drm_gpusvm_for_each_range(9) page ✨ this is the one from the Kernel API Manual, and it's literally all about looping over your GPU SVM ranges inside a notifier. no cap, it's a macro. let's get into it 🫢


🌸 NAME 🌸

drm_gpusvm_for_each_range β€” iterate over GPU SVM ranges in a notifier πŸ’«


✨ SYNOPSIS ✨

drm_gpusvm_for_each_range (range__ , notifier__ , start__ , end__ );

πŸŽ€ ARGUMENTS πŸŽ€

  • range__ β€” the iterator variable for the ranges, iykyk. if it's set, that means it's the start of the iterator. if it's NULL, then the macro calls drm_gpusvm_range_find to go get the range for you πŸ’–
  • notifier__ β€” pointer to the GPU SVM notifier πŸ‘‘
  • start__ β€” start address of the range ⭐
  • end__ β€” end address of the range 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

so this macro is the one you use to iterate over GPU SVM ranges in a notifier. that's the whole glow-up 🀩

and here's the part that lowkey matters: it is safe to use while holding the driver SVM lock or the notifier lock. both. either. you're covered πŸ’…βœ¨

fr fr, remember that safety line β€” that's the whole reason this macro exists, bestie.

πŸ’œ SEE ALSO πŸ’œ

okay this list is long but we do NOT skip it, every single one is here πŸ‘‡

Kernel file ./include/drm/drm_gpusvm.h β€” struct drm_gpusvm_ops(9), struct drm_gpusvm_notifier(9), struct drm_gpusvm_pages_flags(9), struct drm_gpusvm_pages(9), struct drm_gpusvm_range_flags(9), struct drm_gpusvm_range(9), struct drm_gpusvm(9), struct drm_gpusvm_ctx(9), drm_gpusvm_init_pages(9), enum drm_gpusvm_scan_result(9), drm_gpusvm_driver_set_lock(9), drm_gpusvm_notifier_lock(9), drm_gpusvm_notifier_unlock(9), drm_gpusvm_range_start(9), drm_gpusvm_range_end(9), drm_gpusvm_range_size(9), drm_gpusvm_notifier_start(9), drm_gpusvm_notifier_end(9), drm_gpusvm_notifier_size(9), __drm_gpusvm_range_next(9), drm_gpusvm_for_each_range_safe(9), __drm_gpusvm_notifier_next(9), drm_gpusvm_for_each_notifier(9), drm_gpusvm_for_each_notifier_safe(9)


and that's the page, bestie πŸ“ it lives over in ./include/drm and it's dated October 2026 β€” mwah, iconic, periodt πŸ’…πŸŽ€πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from