diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2012-05-29 10:54:26 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-06-11 21:46:47 -0400 |
commit | 80feb89a0a1381642f1cce9036ef3bb22f13b40a (patch) | |
tree | a9eced163f11236e25c82935b898d3d33b823dfb /arch/x86/kvm/mmu.c | |
parent | 25e531a988ea5a64bd97a72dc9d3c65ad5850120 (diff) |
KVM: MMU: Remove unused parameter from mmu_memory_cache_alloc()
Size is not needed to return one from pre-allocated objects.
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 24dd43d45ae4..b32a11dc884c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -652,8 +652,7 @@ static void mmu_free_memory_caches(struct kvm_vcpu *vcpu) | |||
652 | mmu_page_header_cache); | 652 | mmu_page_header_cache); |
653 | } | 653 | } |
654 | 654 | ||
655 | static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc, | 655 | static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc) |
656 | size_t size) | ||
657 | { | 656 | { |
658 | void *p; | 657 | void *p; |
659 | 658 | ||
@@ -664,8 +663,7 @@ static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc, | |||
664 | 663 | ||
665 | static struct pte_list_desc *mmu_alloc_pte_list_desc(struct kvm_vcpu *vcpu) | 664 | static struct pte_list_desc *mmu_alloc_pte_list_desc(struct kvm_vcpu *vcpu) |
666 | { | 665 | { |
667 | return mmu_memory_cache_alloc(&vcpu->arch.mmu_pte_list_desc_cache, | 666 | return mmu_memory_cache_alloc(&vcpu->arch.mmu_pte_list_desc_cache); |
668 | sizeof(struct pte_list_desc)); | ||
669 | } | 667 | } |
670 | 668 | ||
671 | static void mmu_free_pte_list_desc(struct pte_list_desc *pte_list_desc) | 669 | static void mmu_free_pte_list_desc(struct pte_list_desc *pte_list_desc) |
@@ -1403,12 +1401,10 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, | |||
1403 | u64 *parent_pte, int direct) | 1401 | u64 *parent_pte, int direct) |
1404 | { | 1402 | { |
1405 | struct kvm_mmu_page *sp; | 1403 | struct kvm_mmu_page *sp; |
1406 | sp = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_header_cache, | 1404 | sp = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_header_cache); |
1407 | sizeof *sp); | 1405 | sp->spt = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache); |
1408 | sp->spt = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache, PAGE_SIZE); | ||
1409 | if (!direct) | 1406 | if (!direct) |
1410 | sp->gfns = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache, | 1407 | sp->gfns = mmu_memory_cache_alloc(&vcpu->arch.mmu_page_cache); |
1411 | PAGE_SIZE); | ||
1412 | set_page_private(virt_to_page(sp->spt), (unsigned long)sp); | 1408 | set_page_private(virt_to_page(sp->spt), (unsigned long)sp); |
1413 | list_add(&sp->link, &vcpu->kvm->arch.active_mmu_pages); | 1409 | list_add(&sp->link, &vcpu->kvm->arch.active_mmu_pages); |
1414 | bitmap_zero(sp->slot_bitmap, KVM_MEM_SLOTS_NUM); | 1410 | bitmap_zero(sp->slot_bitmap, KVM_MEM_SLOTS_NUM); |