]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: PPC: E500: Make clear_tlb_refs and clear_tlb1_bitmap static
authorAlexander Graf <agraf@suse.de>
Fri, 18 Jan 2013 14:13:19 +0000 (15:13 +0100)
committerAlexander Graf <agraf@suse.de>
Thu, 24 Jan 2013 18:23:33 +0000 (19:23 +0100)
Host shadow TLB flushing is logic that the guest TLB code should have
no insight about. Declare the internal clear_tlb_refs and clear_tlb1_bitmap
functions static to the host TLB handling file.

Instead of these, we can use the already exported kvmppc_core_flush_tlb().
This gives us a common API across the board to say "please flush any
pending host shadow translation".

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/e500_mmu.c
arch/powerpc/kvm/e500_mmu_host.c
arch/powerpc/kvm/e500_mmu_host.h

index c3d1721aa1b8050e75f2a3ceb01d50c1d97f250d..623a192c2658a49b509be3ce1f062d35d8446bb0 100644 (file)
@@ -541,10 +541,8 @@ static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
        int i;
 
-       clear_tlb1_bitmap(vcpu_e500);
+       kvmppc_core_flush_tlb(&vcpu_e500->vcpu);
        kfree(vcpu_e500->g2h_tlb1_map);
-
-       clear_tlb_refs(vcpu_e500);
        kfree(vcpu_e500->gtlb_priv[0]);
        kfree(vcpu_e500->gtlb_priv[1]);
 
@@ -735,7 +733,7 @@ int kvm_vcpu_ioctl_dirty_tlb(struct kvm_vcpu *vcpu,
 {
        struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);
        kvmppc_recalc_tlb1map_range(vcpu_e500);
-       clear_tlb_refs(vcpu_e500);
+       kvmppc_core_flush_tlb(vcpu);
        return 0;
 }
 
index 9a150bced29814fa7e5ebc27b4cf30c91c06cf48..a222edfb9a9bce72e7d642b05853398b493bc679 100644 (file)
@@ -262,7 +262,7 @@ static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
        }
 }
 
-void clear_tlb1_bitmap(struct kvmppc_vcpu_e500 *vcpu_e500)
+static void clear_tlb1_bitmap(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
        if (vcpu_e500->g2h_tlb1_map)
                memset(vcpu_e500->g2h_tlb1_map, 0,
@@ -284,7 +284,7 @@ static void clear_tlb_privs(struct kvmppc_vcpu_e500 *vcpu_e500)
        }
 }
 
-void clear_tlb_refs(struct kvmppc_vcpu_e500 *vcpu_e500)
+static void clear_tlb_refs(struct kvmppc_vcpu_e500 *vcpu_e500)
 {
        int stlbsel = 1;
        int i;
index 9e4d4a20e6944aaa0cb34395122b3eec6a5a3ded..7624835b76c78bf3e1605c1c137bfe9e8117b30c 100644 (file)
@@ -12,8 +12,6 @@
 void inval_gtlbe_on_host(struct kvmppc_vcpu_e500 *vcpu_e500, int tlbsel,
                         int esel);
 
-void clear_tlb1_bitmap(struct kvmppc_vcpu_e500 *vcpu_e500);
-void clear_tlb_refs(struct kvmppc_vcpu_e500 *vcpu_e500);
 int e500_mmu_host_init(struct kvmppc_vcpu_e500 *vcpu_e500);
 void e500_mmu_host_uninit(struct kvmppc_vcpu_e500 *vcpu_e500);