aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2011-11-25 10:14:38 -0500
committerCong Wang <xiyou.wangcong@gmail.com>2012-03-20 09:48:26 -0400
commit0de9a1e28a0d005f42c8cc5456a246710133b9ab (patch)
tree89914affb67e9884ab13e15eb9ce79bfe1a3a13c /kernel/power
parentd762a50b5b1bb93e91cb3cd90b6ae133da98fe31 (diff)
power: remove the second argument of k[un]map_atomic()
Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/snapshot.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 6a768e537001..3a564ac85f36 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1000,20 +1000,20 @@ static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
1000 s_page = pfn_to_page(src_pfn); 1000 s_page = pfn_to_page(src_pfn);
1001 d_page = pfn_to_page(dst_pfn); 1001 d_page = pfn_to_page(dst_pfn);
1002 if (PageHighMem(s_page)) { 1002 if (PageHighMem(s_page)) {
1003 src = kmap_atomic(s_page, KM_USER0); 1003 src = kmap_atomic(s_page);
1004 dst = kmap_atomic(d_page, KM_USER1); 1004 dst = kmap_atomic(d_page);
1005 do_copy_page(dst, src); 1005 do_copy_page(dst, src);
1006 kunmap_atomic(dst, KM_USER1); 1006 kunmap_atomic(dst);
1007 kunmap_atomic(src, KM_USER0); 1007 kunmap_atomic(src);
1008 } else { 1008 } else {
1009 if (PageHighMem(d_page)) { 1009 if (PageHighMem(d_page)) {
1010 /* Page pointed to by src may contain some kernel 1010 /* Page pointed to by src may contain some kernel
1011 * data modified by kmap_atomic() 1011 * data modified by kmap_atomic()
1012 */ 1012 */
1013 safe_copy_page(buffer, s_page); 1013 safe_copy_page(buffer, s_page);
1014 dst = kmap_atomic(d_page, KM_USER0); 1014 dst = kmap_atomic(d_page);
1015 copy_page(dst, buffer); 1015 copy_page(dst, buffer);
1016 kunmap_atomic(dst, KM_USER0); 1016 kunmap_atomic(dst);
1017 } else { 1017 } else {
1018 safe_copy_page(page_address(d_page), s_page); 1018 safe_copy_page(page_address(d_page), s_page);
1019 } 1019 }
@@ -1728,9 +1728,9 @@ int snapshot_read_next(struct snapshot_handle *handle)
1728 */ 1728 */
1729 void *kaddr; 1729 void *kaddr;
1730 1730
1731 kaddr = kmap_atomic(page, KM_USER0); 1731 kaddr = kmap_atomic(page);
1732 copy_page(buffer, kaddr); 1732 copy_page(buffer, kaddr);
1733 kunmap_atomic(kaddr, KM_USER0); 1733 kunmap_atomic(kaddr);
1734 handle->buffer = buffer; 1734 handle->buffer = buffer;
1735 } else { 1735 } else {
1736 handle->buffer = page_address(page); 1736 handle->buffer = page_address(page);
@@ -2014,9 +2014,9 @@ static void copy_last_highmem_page(void)
2014 if (last_highmem_page) { 2014 if (last_highmem_page) {
2015 void *dst; 2015 void *dst;
2016 2016
2017 dst = kmap_atomic(last_highmem_page, KM_USER0); 2017 dst = kmap_atomic(last_highmem_page);
2018 copy_page(dst, buffer); 2018 copy_page(dst, buffer);
2019 kunmap_atomic(dst, KM_USER0); 2019 kunmap_atomic(dst);
2020 last_highmem_page = NULL; 2020 last_highmem_page = NULL;
2021 } 2021 }
2022} 2022}
@@ -2309,13 +2309,13 @@ swap_two_pages_data(struct page *p1, struct page *p2, void *buf)
2309{ 2309{
2310 void *kaddr1, *kaddr2; 2310 void *kaddr1, *kaddr2;
2311 2311
2312 kaddr1 = kmap_atomic(p1, KM_USER0); 2312 kaddr1 = kmap_atomic(p1);
2313 kaddr2 = kmap_atomic(p2, KM_USER1); 2313 kaddr2 = kmap_atomic(p2);
2314 copy_page(buf, kaddr1); 2314 copy_page(buf, kaddr1);
2315 copy_page(kaddr1, kaddr2); 2315 copy_page(kaddr1, kaddr2);
2316 copy_page(kaddr2, buf); 2316 copy_page(kaddr2, buf);
2317 kunmap_atomic(kaddr2, KM_USER1); 2317 kunmap_atomic(kaddr2);
2318 kunmap_atomic(kaddr1, KM_USER0); 2318 kunmap_atomic(kaddr1);
2319} 2319}
2320 2320
2321/** 2321/**