Commit 9c02048f authored by Cong Wang's avatar Cong Wang Committed by Cong Wang

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

Signed-off-by: default avatarCong Wang <amwang@redhat.com>
parent 5472e862
...@@ -498,7 +498,7 @@ static inline void local_r4k_flush_cache_page(void *args) ...@@ -498,7 +498,7 @@ static inline void local_r4k_flush_cache_page(void *args)
if (map_coherent) if (map_coherent)
vaddr = kmap_coherent(page, addr); vaddr = kmap_coherent(page, addr);
else else
vaddr = kmap_atomic(page, KM_USER0); vaddr = kmap_atomic(page);
addr = (unsigned long)vaddr; addr = (unsigned long)vaddr;
} }
...@@ -521,7 +521,7 @@ static inline void local_r4k_flush_cache_page(void *args) ...@@ -521,7 +521,7 @@ static inline void local_r4k_flush_cache_page(void *args)
if (map_coherent) if (map_coherent)
kunmap_coherent(); kunmap_coherent();
else else
kunmap_atomic(vaddr, KM_USER0); kunmap_atomic(vaddr);
} }
} }
......
...@@ -207,21 +207,21 @@ void copy_user_highpage(struct page *to, struct page *from, ...@@ -207,21 +207,21 @@ void copy_user_highpage(struct page *to, struct page *from,
{ {
void *vfrom, *vto; void *vfrom, *vto;
vto = kmap_atomic(to, KM_USER1); vto = kmap_atomic(to);
if (cpu_has_dc_aliases && if (cpu_has_dc_aliases &&
page_mapped(from) && !Page_dcache_dirty(from)) { page_mapped(from) && !Page_dcache_dirty(from)) {
vfrom = kmap_coherent(from, vaddr); vfrom = kmap_coherent(from, vaddr);
copy_page(vto, vfrom); copy_page(vto, vfrom);
kunmap_coherent(); kunmap_coherent();
} else { } else {
vfrom = kmap_atomic(from, KM_USER0); vfrom = kmap_atomic(from);
copy_page(vto, vfrom); copy_page(vto, vfrom);
kunmap_atomic(vfrom, KM_USER0); kunmap_atomic(vfrom);
} }
if ((!cpu_has_ic_fills_f_dc) || if ((!cpu_has_ic_fills_f_dc) ||
pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK)) pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
flush_data_cache_page((unsigned long)vto); flush_data_cache_page((unsigned long)vto);
kunmap_atomic(vto, KM_USER1); kunmap_atomic(vto);
/* Make sure this page is cleared on other CPU's too before using it */ /* Make sure this page is cleared on other CPU's too before using it */
smp_wmb(); smp_wmb();
} }
......
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