aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2013-01-17 20:25:23 -0500
committerAlexander Graf <agraf@suse.de>2013-01-24 13:23:29 -0500
commit9445ef0181ebe0b74c3f2a23191a6f3d9a92b14b (patch)
tree4b9a1609409d455a71810802a2ff88a24488d8de /arch
parent141687869fb904e912568c6b94a6b1fa2114f6ed (diff)
KVM: PPC: E500: Move write_stlbe higher
Later patches want to call the function and it doesn't have dependencies on anything below write_host_tlbe. Move it higher up in the file. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kvm/e500_tlb.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index cf3f18012371..d38ad63fdcb9 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -156,6 +156,22 @@ static inline void write_host_tlbe(struct kvmppc_vcpu_e500 *vcpu_e500,
156 } 156 }
157} 157}
158 158
159/* sesel is for tlb1 only */
160static void write_stlbe(struct kvmppc_vcpu_e500 *vcpu_e500,
161 struct kvm_book3e_206_tlb_entry *gtlbe,
162 struct kvm_book3e_206_tlb_entry *stlbe,
163 int stlbsel, int sesel)
164{
165 int stid;
166
167 preempt_disable();
168 stid = kvmppc_e500_get_tlb_stid(&vcpu_e500->vcpu, gtlbe);
169
170 stlbe->mas1 |= MAS1_TID(stid);
171 write_host_tlbe(vcpu_e500, stlbsel, sesel, stlbe);
172 preempt_enable();
173}
174
159#ifdef CONFIG_KVM_E500V2 175#ifdef CONFIG_KVM_E500V2
160void kvmppc_map_magic(struct kvm_vcpu *vcpu) 176void kvmppc_map_magic(struct kvm_vcpu *vcpu)
161{ 177{
@@ -834,22 +850,6 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, gva_t ea)
834 return EMULATE_DONE; 850 return EMULATE_DONE;
835} 851}
836 852
837/* sesel is for tlb1 only */
838static void write_stlbe(struct kvmppc_vcpu_e500 *vcpu_e500,
839 struct kvm_book3e_206_tlb_entry *gtlbe,
840 struct kvm_book3e_206_tlb_entry *stlbe,
841 int stlbsel, int sesel)
842{
843 int stid;
844
845 preempt_disable();
846 stid = kvmppc_e500_get_tlb_stid(&vcpu_e500->vcpu, gtlbe);
847
848 stlbe->mas1 |= MAS1_TID(stid);
849 write_host_tlbe(vcpu_e500, stlbsel, sesel, stlbe);
850 preempt_enable();
851}
852
853int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu) 853int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu)
854{ 854{
855 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); 855 struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);