diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 12:40:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 12:40:26 -0400 |
commit | 9f3938346a5c1fa504647670edb5fea5756cfb00 (patch) | |
tree | 7cf6d24d6b076c8db8571494984924cac03703a2 /arch/x86 | |
parent | 69a7aebcf019ab3ff5764525ad6858fbe23bb86d (diff) | |
parent | 317b6e128247f75976b0fc2b9fd8d2c20ef13b3a (diff) |
Merge branch 'kmap_atomic' of git://github.com/congwang/linux
Pull kmap_atomic cleanup from Cong Wang.
It's been in -next for a long time, and it gets rid of the (no longer
used) second argument to k[un]map_atomic().
Fix up a few trivial conflicts in various drivers, and do an "evil
merge" to catch some new uses that have come in since Cong's tree.
* 'kmap_atomic' of git://github.com/congwang/linux: (59 commits)
feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal
highmem: kill all __kmap_atomic() [swarren@nvidia.com: highmem: Fix ARM build break due to __kmap_atomic rename]
drbd: remove the second argument of k[un]map_atomic()
zcache: remove the second argument of k[un]map_atomic()
gma500: remove the second argument of k[un]map_atomic()
dm: remove the second argument of k[un]map_atomic()
tomoyo: remove the second argument of k[un]map_atomic()
sunrpc: remove the second argument of k[un]map_atomic()
rds: remove the second argument of k[un]map_atomic()
net: remove the second argument of k[un]map_atomic()
mm: remove the second argument of k[un]map_atomic()
lib: remove the second argument of k[un]map_atomic()
power: remove the second argument of k[un]map_atomic()
kdb: remove the second argument of k[un]map_atomic()
udf: remove the second argument of k[un]map_atomic()
ubifs: remove the second argument of k[un]map_atomic()
squashfs: remove the second argument of k[un]map_atomic()
reiserfs: remove the second argument of k[un]map_atomic()
ocfs2: remove the second argument of k[un]map_atomic()
ntfs: remove the second argument of k[un]map_atomic()
...
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 24 | ||||
-rw-r--r-- | arch/x86/include/asm/highmem.h | 2 | ||||
-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 | ||||
-rw-r--r-- | arch/x86/mm/highmem_32.c | 4 |
8 files changed, 30 insertions, 30 deletions
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index b3350bd32c60..c799352e24fc 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -1108,12 +1108,12 @@ static int __driver_rfc4106_encrypt(struct aead_request *req) | |||
1108 | one_entry_in_sg = 1; | 1108 | one_entry_in_sg = 1; |
1109 | scatterwalk_start(&src_sg_walk, req->src); | 1109 | scatterwalk_start(&src_sg_walk, req->src); |
1110 | scatterwalk_start(&assoc_sg_walk, req->assoc); | 1110 | scatterwalk_start(&assoc_sg_walk, req->assoc); |
1111 | src = scatterwalk_map(&src_sg_walk, 0); | 1111 | src = scatterwalk_map(&src_sg_walk); |
1112 | assoc = scatterwalk_map(&assoc_sg_walk, 0); | 1112 | assoc = scatterwalk_map(&assoc_sg_walk); |
1113 | dst = src; | 1113 | dst = src; |
1114 | if (unlikely(req->src != req->dst)) { | 1114 | if (unlikely(req->src != req->dst)) { |
1115 | scatterwalk_start(&dst_sg_walk, req->dst); | 1115 | scatterwalk_start(&dst_sg_walk, req->dst); |
1116 | dst = scatterwalk_map(&dst_sg_walk, 0); | 1116 | dst = scatterwalk_map(&dst_sg_walk); |
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | } else { | 1119 | } else { |
@@ -1137,11 +1137,11 @@ static int __driver_rfc4106_encrypt(struct aead_request *req) | |||
1137 | * back to the packet. */ | 1137 | * back to the packet. */ |
1138 | if (one_entry_in_sg) { | 1138 | if (one_entry_in_sg) { |
1139 | if (unlikely(req->src != req->dst)) { | 1139 | if (unlikely(req->src != req->dst)) { |
1140 | scatterwalk_unmap(dst, 0); | 1140 | scatterwalk_unmap(dst); |
1141 | scatterwalk_done(&dst_sg_walk, 0, 0); | 1141 | scatterwalk_done(&dst_sg_walk, 0, 0); |
1142 | } | 1142 | } |
1143 | scatterwalk_unmap(src, 0); | 1143 | scatterwalk_unmap(src); |
1144 | scatterwalk_unmap(assoc, 0); | 1144 | scatterwalk_unmap(assoc); |
1145 | scatterwalk_done(&src_sg_walk, 0, 0); | 1145 | scatterwalk_done(&src_sg_walk, 0, 0); |
1146 | scatterwalk_done(&assoc_sg_walk, 0, 0); | 1146 | scatterwalk_done(&assoc_sg_walk, 0, 0); |
1147 | } else { | 1147 | } else { |
@@ -1190,12 +1190,12 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) | |||
1190 | one_entry_in_sg = 1; | 1190 | one_entry_in_sg = 1; |
1191 | scatterwalk_start(&src_sg_walk, req->src); | 1191 | scatterwalk_start(&src_sg_walk, req->src); |
1192 | scatterwalk_start(&assoc_sg_walk, req->assoc); | 1192 | scatterwalk_start(&assoc_sg_walk, req->assoc); |
1193 | src = scatterwalk_map(&src_sg_walk, 0); | 1193 | src = scatterwalk_map(&src_sg_walk); |
1194 | assoc = scatterwalk_map(&assoc_sg_walk, 0); | 1194 | assoc = scatterwalk_map(&assoc_sg_walk); |
1195 | dst = src; | 1195 | dst = src; |
1196 | if (unlikely(req->src != req->dst)) { | 1196 | if (unlikely(req->src != req->dst)) { |
1197 | scatterwalk_start(&dst_sg_walk, req->dst); | 1197 | scatterwalk_start(&dst_sg_walk, req->dst); |
1198 | dst = scatterwalk_map(&dst_sg_walk, 0); | 1198 | dst = scatterwalk_map(&dst_sg_walk); |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | } else { | 1201 | } else { |
@@ -1220,11 +1220,11 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) | |||
1220 | 1220 | ||
1221 | if (one_entry_in_sg) { | 1221 | if (one_entry_in_sg) { |
1222 | if (unlikely(req->src != req->dst)) { | 1222 | if (unlikely(req->src != req->dst)) { |
1223 | scatterwalk_unmap(dst, 0); | 1223 | scatterwalk_unmap(dst); |
1224 | scatterwalk_done(&dst_sg_walk, 0, 0); | 1224 | scatterwalk_done(&dst_sg_walk, 0, 0); |
1225 | } | 1225 | } |
1226 | scatterwalk_unmap(src, 0); | 1226 | scatterwalk_unmap(src); |
1227 | scatterwalk_unmap(assoc, 0); | 1227 | scatterwalk_unmap(assoc); |
1228 | scatterwalk_done(&src_sg_walk, 0, 0); | 1228 | scatterwalk_done(&src_sg_walk, 0, 0); |
1229 | scatterwalk_done(&assoc_sg_walk, 0, 0); | 1229 | scatterwalk_done(&assoc_sg_walk, 0, 0); |
1230 | } else { | 1230 | } else { |
diff --git a/arch/x86/include/asm/highmem.h b/arch/x86/include/asm/highmem.h index 3bd04022fd0c..302a323b3f67 100644 --- a/arch/x86/include/asm/highmem.h +++ b/arch/x86/include/asm/highmem.h | |||
@@ -61,7 +61,7 @@ void *kmap(struct page *page); | |||
61 | void kunmap(struct page *page); | 61 | void kunmap(struct page *page); |
62 | 62 | ||
63 | void *kmap_atomic_prot(struct page *page, pgprot_t prot); | 63 | void *kmap_atomic_prot(struct page *page, pgprot_t prot); |
64 | void *__kmap_atomic(struct page *page); | 64 | void *kmap_atomic(struct page *page); |
65 | void __kunmap_atomic(void *kvaddr); | 65 | void __kunmap_atomic(void *kvaddr); |
66 | void *kmap_atomic_pfn(unsigned long pfn); | 66 | void *kmap_atomic_pfn(unsigned long pfn); |
67 | void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot); | 67 | void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot); |
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); |
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index f4f29b19fac5..6f31ee56c008 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c | |||
@@ -51,11 +51,11 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot) | |||
51 | } | 51 | } |
52 | EXPORT_SYMBOL(kmap_atomic_prot); | 52 | EXPORT_SYMBOL(kmap_atomic_prot); |
53 | 53 | ||
54 | void *__kmap_atomic(struct page *page) | 54 | void *kmap_atomic(struct page *page) |
55 | { | 55 | { |
56 | return kmap_atomic_prot(page, kmap_prot); | 56 | return kmap_atomic_prot(page, kmap_prot); |
57 | } | 57 | } |
58 | EXPORT_SYMBOL(__kmap_atomic); | 58 | EXPORT_SYMBOL(kmap_atomic); |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * This is the same as kmap_atomic() but can map memory that doesn't | 61 | * This is the same as kmap_atomic() but can map memory that doesn't |