Commit 0de9a1e2 authored by Cong Wang's avatar Cong Wang Committed by Cong Wang

power: remove the second argument of k[un]map_atomic()

Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarCong Wang <amwang@redhat.com>
parent d762a50b
...@@ -1000,20 +1000,20 @@ static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn) ...@@ -1000,20 +1000,20 @@ static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
s_page = pfn_to_page(src_pfn); s_page = pfn_to_page(src_pfn);
d_page = pfn_to_page(dst_pfn); d_page = pfn_to_page(dst_pfn);
if (PageHighMem(s_page)) { if (PageHighMem(s_page)) {
src = kmap_atomic(s_page, KM_USER0); src = kmap_atomic(s_page);
dst = kmap_atomic(d_page, KM_USER1); dst = kmap_atomic(d_page);
do_copy_page(dst, src); do_copy_page(dst, src);
kunmap_atomic(dst, KM_USER1); kunmap_atomic(dst);
kunmap_atomic(src, KM_USER0); kunmap_atomic(src);
} else { } else {
if (PageHighMem(d_page)) { if (PageHighMem(d_page)) {
/* Page pointed to by src may contain some kernel /* Page pointed to by src may contain some kernel
* data modified by kmap_atomic() * data modified by kmap_atomic()
*/ */
safe_copy_page(buffer, s_page); safe_copy_page(buffer, s_page);
dst = kmap_atomic(d_page, KM_USER0); dst = kmap_atomic(d_page);
copy_page(dst, buffer); copy_page(dst, buffer);
kunmap_atomic(dst, KM_USER0); kunmap_atomic(dst);
} else { } else {
safe_copy_page(page_address(d_page), s_page); safe_copy_page(page_address(d_page), s_page);
} }
...@@ -1728,9 +1728,9 @@ int snapshot_read_next(struct snapshot_handle *handle) ...@@ -1728,9 +1728,9 @@ int snapshot_read_next(struct snapshot_handle *handle)
*/ */
void *kaddr; void *kaddr;
kaddr = kmap_atomic(page, KM_USER0); kaddr = kmap_atomic(page);
copy_page(buffer, kaddr); copy_page(buffer, kaddr);
kunmap_atomic(kaddr, KM_USER0); kunmap_atomic(kaddr);
handle->buffer = buffer; handle->buffer = buffer;
} else { } else {
handle->buffer = page_address(page); handle->buffer = page_address(page);
...@@ -2014,9 +2014,9 @@ static void copy_last_highmem_page(void) ...@@ -2014,9 +2014,9 @@ static void copy_last_highmem_page(void)
if (last_highmem_page) { if (last_highmem_page) {
void *dst; void *dst;
dst = kmap_atomic(last_highmem_page, KM_USER0); dst = kmap_atomic(last_highmem_page);
copy_page(dst, buffer); copy_page(dst, buffer);
kunmap_atomic(dst, KM_USER0); kunmap_atomic(dst);
last_highmem_page = NULL; last_highmem_page = NULL;
} }
} }
...@@ -2309,13 +2309,13 @@ swap_two_pages_data(struct page *p1, struct page *p2, void *buf) ...@@ -2309,13 +2309,13 @@ swap_two_pages_data(struct page *p1, struct page *p2, void *buf)
{ {
void *kaddr1, *kaddr2; void *kaddr1, *kaddr2;
kaddr1 = kmap_atomic(p1, KM_USER0); kaddr1 = kmap_atomic(p1);
kaddr2 = kmap_atomic(p2, KM_USER1); kaddr2 = kmap_atomic(p2);
copy_page(buf, kaddr1); copy_page(buf, kaddr1);
copy_page(kaddr1, kaddr2); copy_page(kaddr1, kaddr2);
copy_page(kaddr2, buf); copy_page(kaddr2, buf);
kunmap_atomic(kaddr2, KM_USER1); kunmap_atomic(kaddr2);
kunmap_atomic(kaddr1, KM_USER0); kunmap_atomic(kaddr1);
} }
/** /**
......
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