diff options
author | Cong Wang <amwang@redhat.com> | 2011-11-25 10:14:14 -0500 |
---|---|---|
committer | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-20 09:48:13 -0400 |
commit | 1ec9c5ddc17aa398f05646abfcbaf315b544e62f (patch) | |
tree | 7399616ceb7305c648e99c6b7aed46c3abc4a418 /include/linux/highmem.h | |
parent | 980c19e3f8ca1d5d43cce588059ea78cac27062a (diff) |
include/linux/highmem.h: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'include/linux/highmem.h')
-rw-r--r-- | include/linux/highmem.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 11617a835cf2..284ec5535f3d 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -167,9 +167,9 @@ do { \ | |||
167 | #ifndef clear_user_highpage | 167 | #ifndef clear_user_highpage |
168 | static inline void clear_user_highpage(struct page *page, unsigned long vaddr) | 168 | static inline void clear_user_highpage(struct page *page, unsigned long vaddr) |
169 | { | 169 | { |
170 | void *addr = kmap_atomic(page, KM_USER0); | 170 | void *addr = kmap_atomic(page); |
171 | clear_user_page(addr, vaddr, page); | 171 | clear_user_page(addr, vaddr, page); |
172 | kunmap_atomic(addr, KM_USER0); | 172 | kunmap_atomic(addr); |
173 | } | 173 | } |
174 | #endif | 174 | #endif |
175 | 175 | ||
@@ -220,16 +220,16 @@ alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma, | |||
220 | 220 | ||
221 | static inline void clear_highpage(struct page *page) | 221 | static inline void clear_highpage(struct page *page) |
222 | { | 222 | { |
223 | void *kaddr = kmap_atomic(page, KM_USER0); | 223 | void *kaddr = kmap_atomic(page); |
224 | clear_page(kaddr); | 224 | clear_page(kaddr); |
225 | kunmap_atomic(kaddr, KM_USER0); | 225 | kunmap_atomic(kaddr); |
226 | } | 226 | } |
227 | 227 | ||
228 | static inline void zero_user_segments(struct page *page, | 228 | static inline void zero_user_segments(struct page *page, |
229 | unsigned start1, unsigned end1, | 229 | unsigned start1, unsigned end1, |
230 | unsigned start2, unsigned end2) | 230 | unsigned start2, unsigned end2) |
231 | { | 231 | { |
232 | void *kaddr = kmap_atomic(page, KM_USER0); | 232 | void *kaddr = kmap_atomic(page); |
233 | 233 | ||
234 | BUG_ON(end1 > PAGE_SIZE || end2 > PAGE_SIZE); | 234 | BUG_ON(end1 > PAGE_SIZE || end2 > PAGE_SIZE); |
235 | 235 | ||
@@ -239,7 +239,7 @@ static inline void zero_user_segments(struct page *page, | |||
239 | if (end2 > start2) | 239 | if (end2 > start2) |
240 | memset(kaddr + start2, 0, end2 - start2); | 240 | memset(kaddr + start2, 0, end2 - start2); |
241 | 241 | ||
242 | kunmap_atomic(kaddr, KM_USER0); | 242 | kunmap_atomic(kaddr); |
243 | flush_dcache_page(page); | 243 | flush_dcache_page(page); |
244 | } | 244 | } |
245 | 245 | ||
@@ -268,11 +268,11 @@ static inline void copy_user_highpage(struct page *to, struct page *from, | |||
268 | { | 268 | { |
269 | char *vfrom, *vto; | 269 | char *vfrom, *vto; |
270 | 270 | ||
271 | vfrom = kmap_atomic(from, KM_USER0); | 271 | vfrom = kmap_atomic(from); |
272 | vto = kmap_atomic(to, KM_USER1); | 272 | vto = kmap_atomic(to); |
273 | copy_user_page(vto, vfrom, vaddr, to); | 273 | copy_user_page(vto, vfrom, vaddr, to); |
274 | kunmap_atomic(vto, KM_USER1); | 274 | kunmap_atomic(vto); |
275 | kunmap_atomic(vfrom, KM_USER0); | 275 | kunmap_atomic(vfrom); |
276 | } | 276 | } |
277 | 277 | ||
278 | #endif | 278 | #endif |
@@ -281,11 +281,11 @@ static inline void copy_highpage(struct page *to, struct page *from) | |||
281 | { | 281 | { |
282 | char *vfrom, *vto; | 282 | char *vfrom, *vto; |
283 | 283 | ||
284 | vfrom = kmap_atomic(from, KM_USER0); | 284 | vfrom = kmap_atomic(from); |
285 | vto = kmap_atomic(to, KM_USER1); | 285 | vto = kmap_atomic(to); |
286 | copy_page(vto, vfrom); | 286 | copy_page(vto, vfrom); |
287 | kunmap_atomic(vto, KM_USER1); | 287 | kunmap_atomic(vto); |
288 | kunmap_atomic(vfrom, KM_USER0); | 288 | kunmap_atomic(vfrom); |
289 | } | 289 | } |
290 | 290 | ||
291 | #endif /* _LINUX_HIGHMEM_H */ | 291 | #endif /* _LINUX_HIGHMEM_H */ |