kunmap_atomic(9)
π
kunmap_atomic(9) π
okay so welcome to the Kernel API Manual, bestie β today's main character is kunmap_atomic, and the vibe is βunmap that atomic mapping, but make it deprecated.β π«Ά
πΈ NAME πΈ
kunmap_atomic β unmaps the virtual address that was mapped by kmap_atomic() β and yes, it is deprecated! π
β¨ SYNOPSIS β¨
kunmap_atomic (__addr );
π ARGUMENTS π
__addrβ the virtual address you want unmapped, periodt. π
π¦ DESCRIPTION π¦
So this function unmaps an address that was previously mapped by kmap_atomic, and it re-enables pagefaults. Depending on the PREEMPT_RT configuration, it also re-enables migration and preemption. But do not count on those side effects, bestie β they're literally conditional, no cap. π
Mappings should be unmapped in the reverse order that they were mapped. See kmap_local_page for details on nesting. π§
__addr can be any address within the mapped page, so there is no need to subtract any offset that has been added. In contrast to kunmap, this function takes the address returned from kmap_atomic, not the page passed to it. And the compiler will warn you if you pass the page β it's giving βI know what you didβ energy. π
π¨ Also, reminder: this whole thing is deprecated! So maybe don't start a new situationship with it. π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/highmem-internal.h kunmap_local(9)
big mwah from the ./include/linux girlies, dated October 2026, page kunmap_atomic(9) β slay and stay unmapped π
π¦ 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