]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ppc: e500_tlb memset clears nothing
authorAlan Cox <alan@linux.intel.com>
Tue, 14 Aug 2012 12:10:09 +0000 (12:10 +0000)
committerAlexander Graf <agraf@suse.de>
Tue, 14 Aug 2012 22:29:31 +0000 (00:29 +0200)
Put the parameters the right way around

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44031

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/e500_tlb.c

index 6340b3ce9ff3d7807f58a26934958d90963f13b8..1af6fab58995bbf7a0a62c484e2b4632fb3da682 100644 (file)
@@ -320,11 +320,11 @@ static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
 static void clear_tlb1_bitmap(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
        if (vcpu_e500->g2h_tlb1_map)
-               memset(vcpu_e500->g2h_tlb1_map,
-                      sizeof(u64) * vcpu_e500->gtlb_params[1].entries, 0);
+               memset(vcpu_e500->g2h_tlb1_map, 0,
+                      sizeof(u64) * vcpu_e500->gtlb_params[1].entries);
        if (vcpu_e500->h2g_tlb1_rmap)
-               memset(vcpu_e500->h2g_tlb1_rmap,
-                      sizeof(unsigned int) * host_tlb_params[1].entries, 0);
+               memset(vcpu_e500->h2g_tlb1_rmap, 0,
+                      sizeof(unsigned int) * host_tlb_params[1].entries);
 }
 
 static void clear_tlb_privs(struct kvmppc_vcpu_e500 *vcpu_e500)