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/kvm | |
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/kvm')
-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 |
3 files changed, 10 insertions, 10 deletions
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) |