Skip to contentSkip to conversation

highmem-document-kunmap_local.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Mar 25, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The patch titled
Subject: highmem: document kunmap_local()
has been removed from the -mm tree. Its filename was
highmem-document-kunmap_local.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Ira Weiny <[email protected]>
Subject: highmem: document kunmap_local()

Some users of kmap() add an offset to the kmap() address to be used during the mapping.

When converting to kmap_local_page() the base address does not need to be stored because any address within the page can be used in kunmap_local(). However, this was not clear from the documentation and cause some questions.[1]

Document that any address in the page can be used in kunmap_local() to clarify this for future users.

[1] https://lore.kernel.org/lkml/[email protected]/

---

 include/linux/highmem-internal.h |   10 ++++++++++
 1 file changed, 10 insertions(+)
include/linux/highmem-internal.h renamed from include/linux/highmem-internal.h~highmem-document-kunmap_local +10 -0
@@ -246,6 +246,16 @@ do {								\
 	__kunmap_atomic(__addr);				\
 } while (0)
 
+/**
+ * kunmap_local - Unmap a page mapped via kmap_local_page().
+ * @__addr: An address within the page mapped
+ *
+ * @__addr can be any address within the mapped page.  Commonly it is the
+ * address return from kmap_local_page(), but it can also include offsets.
+ *
+ * Unmapping should be done in the reverse order of the mapping.  See
+ * kmap_local_page() for details.
+ */
 #define kunmap_local(__addr)					\
 do {								\
 	BUILD_BUG_ON(__same_type((__addr), struct page *));	\

_

Patches currently in -mm which might be from [email protected] are