diff options
Diffstat (limited to 'arch/sh/mm/cache.c')
-rw-r--r-- | arch/sh/mm/cache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index 5a580ea04429..616966a96cba 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c | |||
@@ -95,7 +95,7 @@ void copy_user_highpage(struct page *to, struct page *from, | |||
95 | { | 95 | { |
96 | void *vfrom, *vto; | 96 | void *vfrom, *vto; |
97 | 97 | ||
98 | vto = kmap_atomic(to, KM_USER1); | 98 | vto = kmap_atomic(to); |
99 | 99 | ||
100 | if (boot_cpu_data.dcache.n_aliases && page_mapped(from) && | 100 | if (boot_cpu_data.dcache.n_aliases && page_mapped(from) && |
101 | test_bit(PG_dcache_clean, &from->flags)) { | 101 | test_bit(PG_dcache_clean, &from->flags)) { |
@@ -103,16 +103,16 @@ void copy_user_highpage(struct page *to, struct page *from, | |||
103 | copy_page(vto, vfrom); | 103 | copy_page(vto, vfrom); |
104 | kunmap_coherent(vfrom); | 104 | kunmap_coherent(vfrom); |
105 | } else { | 105 | } else { |
106 | vfrom = kmap_atomic(from, KM_USER0); | 106 | vfrom = kmap_atomic(from); |
107 | copy_page(vto, vfrom); | 107 | copy_page(vto, vfrom); |
108 | kunmap_atomic(vfrom, KM_USER0); | 108 | kunmap_atomic(vfrom); |
109 | } | 109 | } |
110 | 110 | ||
111 | if (pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK) || | 111 | if (pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK) || |
112 | (vma->vm_flags & VM_EXEC)) | 112 | (vma->vm_flags & VM_EXEC)) |
113 | __flush_purge_region(vto, PAGE_SIZE); | 113 | __flush_purge_region(vto, PAGE_SIZE); |
114 | 114 | ||
115 | kunmap_atomic(vto, KM_USER1); | 115 | kunmap_atomic(vto); |
116 | /* Make sure this page is cleared on other CPU's too before using it */ | 116 | /* Make sure this page is cleared on other CPU's too before using it */ |
117 | smp_wmb(); | 117 | smp_wmb(); |
118 | } | 118 | } |
@@ -120,14 +120,14 @@ EXPORT_SYMBOL(copy_user_highpage); | |||
120 | 120 | ||
121 | void clear_user_highpage(struct page *page, unsigned long vaddr) | 121 | void clear_user_highpage(struct page *page, unsigned long vaddr) |
122 | { | 122 | { |
123 | void *kaddr = kmap_atomic(page, KM_USER0); | 123 | void *kaddr = kmap_atomic(page); |
124 | 124 | ||
125 | clear_page(kaddr); | 125 | clear_page(kaddr); |
126 | 126 | ||
127 | if (pages_do_alias((unsigned long)kaddr, vaddr & PAGE_MASK)) | 127 | if (pages_do_alias((unsigned long)kaddr, vaddr & PAGE_MASK)) |
128 | __flush_purge_region(kaddr, PAGE_SIZE); | 128 | __flush_purge_region(kaddr, PAGE_SIZE); |
129 | 129 | ||
130 | kunmap_atomic(kaddr, KM_USER0); | 130 | kunmap_atomic(kaddr); |
131 | } | 131 | } |
132 | EXPORT_SYMBOL(clear_user_highpage); | 132 | EXPORT_SYMBOL(clear_user_highpage); |
133 | 133 | ||