diff options
author | Cong Wang <amwang@redhat.com> | 2011-11-25 10:14:17 -0500 |
---|---|---|
committer | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-20 09:48:15 -0400 |
commit | 8fd75e1216e0ba601a746177e6c102d5593b572f (patch) | |
tree | d9f8e867ccec9ecaa2b77616a01c1c3d0875d76e /arch | |
parent | 91f2359396d87f24ea43d91ff77dec54847ad69a (diff) |
x86: remove the second argument of k[un]map_atomic()
Acked-by: Avi Kivity <avi@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 24 | ||||
-rw-r--r-- | arch/x86/kernel/crash_dump_32.c | 6 | ||||
-rw-r--r-- | arch/x86/kvm/lapic.c | 8 | ||||
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 4 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 8 | ||||
-rw-r--r-- | arch/x86/lib/usercopy_32.c | 4 |
6 files changed, 27 insertions, 27 deletions
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 545d0ce59818..152232d2dc6a 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -1107,12 +1107,12 @@ static int __driver_rfc4106_encrypt(struct aead_request *req) | |||
1107 | one_entry_in_sg = 1; | 1107 | one_entry_in_sg = 1; |
1108 | scatterwalk_start(&src_sg_walk, req->src); | 1108 | scatterwalk_start(&src_sg_walk, req->src); |
1109 | scatterwalk_start(&assoc_sg_walk, req->assoc); | 1109 | scatterwalk_start(&assoc_sg_walk, req->assoc); |
1110 | src = scatterwalk_map(&src_sg_walk, 0); | 1110 | src = scatterwalk_map(&src_sg_walk); |
1111 | assoc = scatterwalk_map(&assoc_sg_walk, 0); | 1111 | assoc = scatterwalk_map(&assoc_sg_walk); |
1112 | dst = src; | 1112 | dst = src; |
1113 | if (unlikely(req->src != req->dst)) { | 1113 | if (unlikely(req->src != req->dst)) { |
1114 | scatterwalk_start(&dst_sg_walk, req->dst); | 1114 | scatterwalk_start(&dst_sg_walk, req->dst); |
1115 | dst = scatterwalk_map(&dst_sg_walk, 0); | 1115 | dst = scatterwalk_map(&dst_sg_walk); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | } else { | 1118 | } else { |
@@ -1136,11 +1136,11 @@ static int __driver_rfc4106_encrypt(struct aead_request *req) | |||
1136 | * back to the packet. */ | 1136 | * back to the packet. */ |
1137 | if (one_entry_in_sg) { | 1137 | if (one_entry_in_sg) { |
1138 | if (unlikely(req->src != req->dst)) { | 1138 | if (unlikely(req->src != req->dst)) { |
1139 | scatterwalk_unmap(dst, 0); | 1139 | scatterwalk_unmap(dst); |
1140 | scatterwalk_done(&dst_sg_walk, 0, 0); | 1140 | scatterwalk_done(&dst_sg_walk, 0, 0); |
1141 | } | 1141 | } |
1142 | scatterwalk_unmap(src, 0); | 1142 | scatterwalk_unmap(src); |
1143 | scatterwalk_unmap(assoc, 0); | 1143 | scatterwalk_unmap(assoc); |
1144 | scatterwalk_done(&src_sg_walk, 0, 0); | 1144 | scatterwalk_done(&src_sg_walk, 0, 0); |
1145 | scatterwalk_done(&assoc_sg_walk, 0, 0); | 1145 | scatterwalk_done(&assoc_sg_walk, 0, 0); |
1146 | } else { | 1146 | } else { |
@@ -1189,12 +1189,12 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) | |||
1189 | one_entry_in_sg = 1; | 1189 | one_entry_in_sg = 1; |
1190 | scatterwalk_start(&src_sg_walk, req->src); | 1190 | scatterwalk_start(&src_sg_walk, req->src); |
1191 | scatterwalk_start(&assoc_sg_walk, req->assoc); | 1191 | scatterwalk_start(&assoc_sg_walk, req->assoc); |
1192 | src = scatterwalk_map(&src_sg_walk, 0); | 1192 | src = scatterwalk_map(&src_sg_walk); |
1193 | assoc = scatterwalk_map(&assoc_sg_walk, 0); | 1193 | assoc = scatterwalk_map(&assoc_sg_walk); |
1194 | dst = src; | 1194 | dst = src; |
1195 | if (unlikely(req->src != req->dst)) { | 1195 | if (unlikely(req->src != req->dst)) { |
1196 | scatterwalk_start(&dst_sg_walk, req->dst); | 1196 | scatterwalk_start(&dst_sg_walk, req->dst); |
1197 | dst = scatterwalk_map(&dst_sg_walk, 0); | 1197 | dst = scatterwalk_map(&dst_sg_walk); |
1198 | } | 1198 | } |
1199 | 1199 | ||
1200 | } else { | 1200 | } else { |
@@ -1219,11 +1219,11 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) | |||
1219 | 1219 | ||
1220 | if (one_entry_in_sg) { | 1220 | if (one_entry_in_sg) { |
1221 | if (unlikely(req->src != req->dst)) { | 1221 | if (unlikely(req->src != req->dst)) { |
1222 | scatterwalk_unmap(dst, 0); | 1222 | scatterwalk_unmap(dst); |
1223 | scatterwalk_done(&dst_sg_walk, 0, 0); | 1223 | scatterwalk_done(&dst_sg_walk, 0, 0); |
1224 | } | 1224 | } |
1225 | scatterwalk_unmap(src, 0); | 1225 | scatterwalk_unmap(src); |
1226 | scatterwalk_unmap(assoc, 0); | 1226 | scatterwalk_unmap(assoc); |
1227 | scatterwalk_done(&src_sg_walk, 0, 0); | 1227 | scatterwalk_done(&src_sg_walk, 0, 0); |
1228 | scatterwalk_done(&assoc_sg_walk, 0, 0); | 1228 | scatterwalk_done(&assoc_sg_walk, 0, 0); |
1229 | } else { | 1229 | } else { |
diff --git a/arch/x86/kernel/crash_dump_32.c b/arch/x86/kernel/crash_dump_32.c index 642f75a68cd5..11891ca7b716 100644 --- a/arch/x86/kernel/crash_dump_32.c +++ b/arch/x86/kernel/crash_dump_32.c | |||
@@ -62,16 +62,16 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, | |||
62 | 62 | ||
63 | if (!userbuf) { | 63 | if (!userbuf) { |
64 | memcpy(buf, (vaddr + offset), csize); | 64 | memcpy(buf, (vaddr + offset), csize); |
65 | kunmap_atomic(vaddr, KM_PTE0); | 65 | kunmap_atomic(vaddr); |
66 | } else { | 66 | } else { |
67 | if (!kdump_buf_page) { | 67 | if (!kdump_buf_page) { |
68 | printk(KERN_WARNING "Kdump: Kdump buffer page not" | 68 | printk(KERN_WARNING "Kdump: Kdump buffer page not" |
69 | " allocated\n"); | 69 | " allocated\n"); |
70 | kunmap_atomic(vaddr, KM_PTE0); | 70 | kunmap_atomic(vaddr); |
71 | return -EFAULT; | 71 | return -EFAULT; |
72 | } | 72 | } |
73 | copy_page(kdump_buf_page, vaddr); | 73 | copy_page(kdump_buf_page, vaddr); |
74 | kunmap_atomic(vaddr, KM_PTE0); | 74 | kunmap_atomic(vaddr); |
75 | if (copy_to_user(buf, (kdump_buf_page + offset), csize)) | 75 | if (copy_to_user(buf, (kdump_buf_page + offset), csize)) |
76 | return -EFAULT; | 76 | return -EFAULT; |
77 | } | 77 | } |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index cfdc6e0ef002..31bfc6927bc0 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1283,9 +1283,9 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) | |||
1283 | if (!irqchip_in_kernel(vcpu->kvm) || !vcpu->arch.apic->vapic_addr) | 1283 | if (!irqchip_in_kernel(vcpu->kvm) || !vcpu->arch.apic->vapic_addr) |
1284 | return; | 1284 | return; |
1285 | 1285 | ||
1286 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page, KM_USER0); | 1286 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page); |
1287 | data = *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)); | 1287 | data = *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)); |
1288 | kunmap_atomic(vapic, KM_USER0); | 1288 | kunmap_atomic(vapic); |
1289 | 1289 | ||
1290 | apic_set_tpr(vcpu->arch.apic, data & 0xff); | 1290 | apic_set_tpr(vcpu->arch.apic, data & 0xff); |
1291 | } | 1291 | } |
@@ -1310,9 +1310,9 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) | |||
1310 | max_isr = 0; | 1310 | max_isr = 0; |
1311 | data = (tpr & 0xff) | ((max_isr & 0xf0) << 8) | (max_irr << 24); | 1311 | data = (tpr & 0xff) | ((max_isr & 0xf0) << 8) | (max_irr << 24); |
1312 | 1312 | ||
1313 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page, KM_USER0); | 1313 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page); |
1314 | *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)) = data; | 1314 | *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)) = data; |
1315 | kunmap_atomic(vapic, KM_USER0); | 1315 | kunmap_atomic(vapic); |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) | 1318 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) |
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 15610285ebb6..df5a70311be8 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -92,9 +92,9 @@ static int FNAME(cmpxchg_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, | |||
92 | if (unlikely(npages != 1)) | 92 | if (unlikely(npages != 1)) |
93 | return -EFAULT; | 93 | return -EFAULT; |
94 | 94 | ||
95 | table = kmap_atomic(page, KM_USER0); | 95 | table = kmap_atomic(page); |
96 | ret = CMPXCHG(&table[index], orig_pte, new_pte); | 96 | ret = CMPXCHG(&table[index], orig_pte, new_pte); |
97 | kunmap_atomic(table, KM_USER0); | 97 | kunmap_atomic(table); |
98 | 98 | ||
99 | kvm_release_page_dirty(page); | 99 | kvm_release_page_dirty(page); |
100 | 100 | ||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9cbfc0698118..bb4fd2636bc2 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1162,12 +1162,12 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) | |||
1162 | */ | 1162 | */ |
1163 | vcpu->hv_clock.version += 2; | 1163 | vcpu->hv_clock.version += 2; |
1164 | 1164 | ||
1165 | shared_kaddr = kmap_atomic(vcpu->time_page, KM_USER0); | 1165 | shared_kaddr = kmap_atomic(vcpu->time_page); |
1166 | 1166 | ||
1167 | memcpy(shared_kaddr + vcpu->time_offset, &vcpu->hv_clock, | 1167 | memcpy(shared_kaddr + vcpu->time_offset, &vcpu->hv_clock, |
1168 | sizeof(vcpu->hv_clock)); | 1168 | sizeof(vcpu->hv_clock)); |
1169 | 1169 | ||
1170 | kunmap_atomic(shared_kaddr, KM_USER0); | 1170 | kunmap_atomic(shared_kaddr); |
1171 | 1171 | ||
1172 | mark_page_dirty(v->kvm, vcpu->time >> PAGE_SHIFT); | 1172 | mark_page_dirty(v->kvm, vcpu->time >> PAGE_SHIFT); |
1173 | return 0; | 1173 | return 0; |
@@ -3848,7 +3848,7 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, | |||
3848 | goto emul_write; | 3848 | goto emul_write; |
3849 | } | 3849 | } |
3850 | 3850 | ||
3851 | kaddr = kmap_atomic(page, KM_USER0); | 3851 | kaddr = kmap_atomic(page); |
3852 | kaddr += offset_in_page(gpa); | 3852 | kaddr += offset_in_page(gpa); |
3853 | switch (bytes) { | 3853 | switch (bytes) { |
3854 | case 1: | 3854 | case 1: |
@@ -3866,7 +3866,7 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, | |||
3866 | default: | 3866 | default: |
3867 | BUG(); | 3867 | BUG(); |
3868 | } | 3868 | } |
3869 | kunmap_atomic(kaddr, KM_USER0); | 3869 | kunmap_atomic(kaddr); |
3870 | kvm_release_page_dirty(page); | 3870 | kvm_release_page_dirty(page); |
3871 | 3871 | ||
3872 | if (!exchanged) | 3872 | if (!exchanged) |
diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c index e218d5df85ff..d9b094ca7aaa 100644 --- a/arch/x86/lib/usercopy_32.c +++ b/arch/x86/lib/usercopy_32.c | |||
@@ -760,9 +760,9 @@ survive: | |||
760 | break; | 760 | break; |
761 | } | 761 | } |
762 | 762 | ||
763 | maddr = kmap_atomic(pg, KM_USER0); | 763 | maddr = kmap_atomic(pg); |
764 | memcpy(maddr + offset, from, len); | 764 | memcpy(maddr + offset, from, len); |
765 | kunmap_atomic(maddr, KM_USER0); | 765 | kunmap_atomic(maddr); |
766 | set_page_dirty_lock(pg); | 766 | set_page_dirty_lock(pg); |
767 | put_page(pg); | 767 | put_page(pg); |
768 | up_read(¤t->mm->mmap_sem); | 768 | up_read(¤t->mm->mmap_sem); |