From: ira.weiny@intel.com
To: Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Ira Weiny <ira.weiny@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Matthew Wilcox <willy@infradead.org>,
Christoph Hellwig <hch@infradead.org>,
Eric Biggers <ebiggers@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH V2 1/2] mm/highmem: Remove deprecated kmap_atomic
Date: Mon, 7 Dec 2020 14:57:02 -0800 [thread overview]
Message-ID: <20201207225703.2033611-2-ira.weiny@intel.com> (raw)
In-Reply-To: <20201207225703.2033611-1-ira.weiny@intel.com>
From: Ira Weiny <ira.weiny@intel.com>
kmap_atomic() is being deprecated in favor of kmap_local_page().
Replace the uses of kmap_atomic() within the highmem code.
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
include/linux/highmem.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index f597830f26b4..3bfe6a12d14d 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -146,9 +146,9 @@ static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
#ifndef clear_user_highpage
static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
{
- void *addr = kmap_atomic(page);
+ void *addr = kmap_local_page(page);
clear_user_page(addr, vaddr, page);
- kunmap_atomic(addr);
+ kunmap_local(addr);
}
#endif
@@ -199,16 +199,16 @@ alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma,
static inline void clear_highpage(struct page *page)
{
- void *kaddr = kmap_atomic(page);
+ void *kaddr = kmap_local_page(page);
clear_page(kaddr);
- kunmap_atomic(kaddr);
+ kunmap_local(kaddr);
}
static inline void zero_user_segments(struct page *page,
unsigned start1, unsigned end1,
unsigned start2, unsigned end2)
{
- void *kaddr = kmap_atomic(page);
+ void *kaddr = kmap_local_page(page);
BUG_ON(end1 > PAGE_SIZE || end2 > PAGE_SIZE);
@@ -218,7 +218,7 @@ static inline void zero_user_segments(struct page *page,
if (end2 > start2)
memset(kaddr + start2, 0, end2 - start2);
- kunmap_atomic(kaddr);
+ kunmap_local(kaddr);
flush_dcache_page(page);
}
@@ -241,11 +241,11 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
{
char *vfrom, *vto;
- vfrom = kmap_atomic(from);
- vto = kmap_atomic(to);
+ vfrom = kmap_local_page(from);
+ vto = kmap_local_page(to);
copy_user_page(vto, vfrom, vaddr, to);
- kunmap_atomic(vto);
- kunmap_atomic(vfrom);
+ kunmap_local(vto);
+ kunmap_local(vfrom);
}
#endif
@@ -256,11 +256,11 @@ static inline void copy_highpage(struct page *to, struct page *from)
{
char *vfrom, *vto;
- vfrom = kmap_atomic(from);
- vto = kmap_atomic(to);
+ vfrom = kmap_local_page(from);
+ vto = kmap_local_page(to);
copy_page(vto, vfrom);
- kunmap_atomic(vto);
- kunmap_atomic(vfrom);
+ kunmap_local(vto);
+ kunmap_local(vfrom);
}
#endif
--
2.28.0.rc0.12.gb6a658bd00c9
next prev parent reply other threads:[~2020-12-07 22:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 22:57 [PATCH V2 0/2] Lift memcpy_[to|from]_page to core ira.weiny
2020-12-07 22:57 ` ira.weiny [this message]
2020-12-07 22:57 ` [PATCH V2 2/2] mm/highmem: " ira.weiny
2020-12-07 23:26 ` Matthew Wilcox
2020-12-07 23:34 ` Dan Williams
2020-12-07 23:40 ` Matthew Wilcox
2020-12-07 23:49 ` Dan Williams
2020-12-08 21:32 ` Ira Weiny
2020-12-08 21:50 ` Matthew Wilcox
2020-12-08 22:23 ` Dan Williams
2020-12-08 22:32 ` Matthew Wilcox
2020-12-08 22:45 ` Darrick J. Wong
2020-12-08 22:54 ` Matthew Wilcox
2020-12-08 23:40 ` Dan Williams
2020-12-09 2:22 ` Ira Weiny
2020-12-09 4:03 ` Matthew Wilcox
2020-12-09 19:47 ` Dan Williams
2020-12-09 20:14 ` Matthew Wilcox
2020-12-09 20:19 ` Dan Williams
2020-12-10 5:35 ` Ira Weiny
2020-12-08 22:21 ` Dan Williams
2020-12-08 12:23 ` Matthew Wilcox
2020-12-08 16:38 ` Ira Weiny
2020-12-08 16:40 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201207225703.2033611-2-ira.weiny@intel.com \
--to=ira.weiny@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=ebiggers@kernel.org \
--cc=hch@infradead.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).