amdgpu_pasid_lock(9)
π amdgpu_pasid_lock(9) π
okay bestie, welcome to the Kernel API Manual β¨ you're literally reading the page for amdgpu_pasid_lock and it's giving "tiny function, big responsibility" energy. let's get into it π«Ά
πΈ NAME πΈ
amdgpu_pasid_lock β acquire the global PASID xarray lock π
like, the global one. the whole xarray. not just your little corner of it. iconic of her tbh π
β¨ SYNOPSIS β¨
void amdgpu_pasid_lock (unsigned long *flags );
no return value, she just does her thing and dips π
π ARGUMENTS π
flagsβ storage for interrupt state π©· this is where the saved interrupt state goes when you call her. keep it safe, you'll need it later (spoiler:amdgpu_pasid_unlockwants it back).
π¦ DESCRIPTION π¦
so here's the vibe: amdgpu_pasid_lock acquires the global PASID xarray lock and it does it with interrupts disabled β ngl that's the whole point, no cap π₯
the saved interrupt state? it's in flags, and you must pass it to amdgpu_pasid_unlock. not optional, not "i'll remember it in my head", just pass it. that's the contract, periodt β¨
β οΈ bestie, do not lose that flags value. the state goes in, the state comes back out. that's the lock/unlock pipeline and it's lowkey sacred π
π SEE ALSO π
Kernel file: ./drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c π (the mothership, iykyk)
and the whole friend group π:
amdgpu_pasid_alloc(9)amdgpu_pasid_free(9)amdgpu_pasid_clear_owner(9)amdgpu_pasid_unlock(9)amdgpu_pasid_get_fpriv_locked(9)amdgpu_pasid_free_delayed(9)amdgpu_vmid_had_gpu_reset(9)amdgpu_vmid_grab_idle(9)amdgpu_vmid_grab_reserved(9)amdgpu_vmid_grab_used(9)amdgpu_vmid_grab(9)amdgpu_vmid_reset(9)amdgpu_vmid_reset_all(9)amdgpu_vmid_mgr_init(9)amdgpu_vmid_mgr_fini(9)amdgpu_pasid_mgr_cleanup(9)
and that's the whole page, bestie π§π slay responsibly, lock your xarrays, and always hand your flags to amdgpu_pasid_unlock β mwah π
sign-off szn: this little masterpiece lives in ./drivers/gpu/drm/amd/amdgpu and it's dated October 2026 β yes, from the future, we stay ahead of schedule βπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms