aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBharat Bhushan <r65777@freescale.com>2013-11-15 00:31:14 -0500
committerAlexander Graf <agraf@suse.de>2014-01-09 04:15:06 -0500
commit7c85e6b39ce880869929958bd7b95f72db03a9af (patch)
treeb56c1cedcc88172d7895ecc98adc7261cb305040
parent30a91fe24b7a6475d22d22fb0f772318ed435a1d (diff)
kvm: book3s: rename lookup_linux_pte() to lookup_linux_pte_and_update()
lookup_linux_pte() is doing more than lookup, updating the pte, so for clarity it is renamed to lookup_linux_pte_and_update() Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Reviewed-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--arch/powerpc/kvm/book3s_hv_rm_mmu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 9c515440ad1a..daa19a043677 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -134,7 +134,7 @@ static void remove_revmap_chain(struct kvm *kvm, long pte_index,
134 unlock_rmap(rmap); 134 unlock_rmap(rmap);
135} 135}
136 136
137static pte_t lookup_linux_pte(pgd_t *pgdir, unsigned long hva, 137static pte_t lookup_linux_pte_and_update(pgd_t *pgdir, unsigned long hva,
138 int writing, unsigned long *pte_sizep) 138 int writing, unsigned long *pte_sizep)
139{ 139{
140 pte_t *ptep; 140 pte_t *ptep;
@@ -231,7 +231,8 @@ long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags,
231 231
232 /* Look up the Linux PTE for the backing page */ 232 /* Look up the Linux PTE for the backing page */
233 pte_size = psize; 233 pte_size = psize;
234 pte = lookup_linux_pte(pgdir, hva, writing, &pte_size); 234 pte = lookup_linux_pte_and_update(pgdir, hva, writing,
235 &pte_size);
235 if (pte_present(pte)) { 236 if (pte_present(pte)) {
236 if (writing && !pte_write(pte)) 237 if (writing && !pte_write(pte))
237 /* make the actual HPTE be read-only */ 238 /* make the actual HPTE be read-only */
@@ -671,7 +672,8 @@ long kvmppc_h_protect(struct kvm_vcpu *vcpu, unsigned long flags,
671 memslot = __gfn_to_memslot(kvm_memslots(kvm), gfn); 672 memslot = __gfn_to_memslot(kvm_memslots(kvm), gfn);
672 if (memslot) { 673 if (memslot) {
673 hva = __gfn_to_hva_memslot(memslot, gfn); 674 hva = __gfn_to_hva_memslot(memslot, gfn);
674 pte = lookup_linux_pte(pgdir, hva, 1, &psize); 675 pte = lookup_linux_pte_and_update(pgdir, hva,
676 1, &psize);
675 if (pte_present(pte) && !pte_write(pte)) 677 if (pte_present(pte) && !pte_write(pte))
676 r = hpte_make_readonly(r); 678 r = hpte_make_readonly(r);
677 } 679 }