Commit 383bbef2 authored by Fabio M. De Francesco's avatar Fabio M. De Francesco Committed by Andrew Morton

highmem: specify that kmap_local_page() is callable from interrupts

In a recent thread about converting kmap() to kmap_local_page(), the
safety of calling kmap_local_page() was questioned.[1]

"any context" should probably be enough detail for users who want to know
whether or not kmap_local_page() can be called from interrupts.  However,
Linux still has kmap_atomic() which might make users think they must use
the latter in interrupts.

Add "including interrupts" for better clarity.

[1] https://lore.kernel.org/lkml/3187836.aeNJFYEL58@opensuse/

Link: https://lkml.kernel.org/r/20220728154844.10874-3-fmdefrancesco@gmail.comSigned-off-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
Suggested-by: default avatarIra Weiny <ira.weiny@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 729337bc
...@@ -64,7 +64,7 @@ static inline void kmap_flush_unused(void); ...@@ -64,7 +64,7 @@ static inline void kmap_flush_unused(void);
* *
* Returns: The virtual address of the mapping * Returns: The virtual address of the mapping
* *
* Can be invoked from any context. * Can be invoked from any context, including interrupts.
* *
* Requires careful handling when nesting multiple mappings because the map * Requires careful handling when nesting multiple mappings because the map
* management is stack based. The unmap has to be in the reverse order of * management is stack based. The unmap has to be in the reverse order of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment