WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] use pte_pfn() where possible

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] use pte_pfn() where possible
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2008 03:50:41 -0800
Delivery-date: Mon, 01 Dec 2008 03:54:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1225941297 -32400
# Node ID f6795589ef82eb0b0d43162685d54df66d0c358a
# Parent  958942c443329a6ea27665c1026040213cbfd991
[IA64] use pte_pfn() where possible

use pte_pfn() to get mfn from pte.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/vmx/sioemu.c    |    2 +-
 xen/arch/ia64/vmx/vmmu.c      |    2 +-
 xen/arch/ia64/vmx/vmx_fault.c |    4 ++--
 xen/arch/ia64/vmx/vmx_init.c  |    2 +-
 xen/arch/ia64/vmx/vtlb.c      |    3 +--
 xen/arch/ia64/xen/dom0_ops.c  |    2 +-
 6 files changed, 7 insertions(+), 8 deletions(-)

diff -r 958942c44332 -r f6795589ef82 xen/arch/ia64/vmx/sioemu.c
--- a/xen/arch/ia64/vmx/sioemu.c        Thu Nov 06 12:14:06 2008 +0900
+++ b/xen/arch/ia64/vmx/sioemu.c        Thu Nov 06 12:14:57 2008 +0900
@@ -148,7 +148,7 @@ sioemu_set_callback (struct vcpu *v, uns
     pte = *lookup_noalloc_domain_pte(v->domain, paddr);
     if (!pte_present(pte) || !pte_mem(pte))
         return -EINVAL;
-    mfn = (pte_val(pte) & _PFN_MASK) >> PAGE_SHIFT;
+    mfn = pte_pfn(pte);
     ASSERT(mfn_valid(mfn));
 
     page = mfn_to_page(mfn);
diff -r 958942c44332 -r f6795589ef82 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Thu Nov 06 12:14:06 2008 +0900
+++ b/xen/arch/ia64/vmx/vmmu.c  Thu Nov 06 12:14:57 2008 +0900
@@ -312,7 +312,7 @@ IA64FAULT vmx_vcpu_itr_d(VCPU *vcpu, u64
     */   
     if (ps != _PAGE_SIZE_16M)
         thash_purge_entries(vcpu, va, ps);
-    gpfn = (pte & _PAGE_PPN_MASK)>> PAGE_SHIFT;
+    gpfn = pte_pfn(__pte(pte));
     vcpu_get_rr(vcpu, va, &rid);
     rid &= RR_RID_MASK;
     p_dtr = (thash_data_t *)&vcpu->arch.dtrs[slot];
diff -r 958942c44332 -r f6795589ef82 xen/arch/ia64/vmx/vmx_fault.c
--- a/xen/arch/ia64/vmx/vmx_fault.c     Thu Nov 06 12:14:06 2008 +0900
+++ b/xen/arch/ia64/vmx/vmx_fault.c     Thu Nov 06 12:14:57 2008 +0900
@@ -376,7 +376,7 @@ vmx_hpw_miss(u64 vadr, u64 vec, REGS* re
                 pte = lookup_domain_mpa(v->domain, pa_clear_uc(vadr), NULL);
                 if (v->domain != dom0 && (pte & _PAGE_IO)) {
                     emulate_io_inst(v, pa_clear_uc(vadr), 4,
-                                    (pte & _PFN_MASK) >> PAGE_SHIFT);
+                                    pte_pfn(__pte(pte)));
                     return IA64_FAULT;
                 }
                 physical_tlb_miss(v, vadr, type);
@@ -413,7 +413,7 @@ try_again:
                                  " pte=0x%lx\n", data->page_flags);
                 if (data->pl >= ((regs->cr_ipsr >> IA64_PSR_CPL0_BIT) & 3))
                     emulate_io_inst(v, gppa, data->ma, 
-                                    (pte & _PFN_MASK) >> PAGE_SHIFT);
+                                    pte_pfn(__pte(pte)));
                 else {
                     vcpu_set_isr(v, misr.val);
                     data_access_rights(v, vadr);
diff -r 958942c44332 -r f6795589ef82 xen/arch/ia64/vmx/vmx_init.c
--- a/xen/arch/ia64/vmx/vmx_init.c      Thu Nov 06 12:14:06 2008 +0900
+++ b/xen/arch/ia64/vmx/vmx_init.c      Thu Nov 06 12:14:57 2008 +0900
@@ -457,7 +457,7 @@ int vmx_set_ioreq_page(
        pte = *lookup_noalloc_domain_pte(d, gpfn << PAGE_SHIFT);
        if (!pte_present(pte) || !pte_mem(pte))
                return -EINVAL;
-       mfn = (pte_val(pte) & _PFN_MASK) >> PAGE_SHIFT;
+       mfn = pte_pfn(pte);
        ASSERT(mfn_valid(mfn));
 
        page = mfn_to_page(mfn);
diff -r 958942c44332 -r f6795589ef82 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Thu Nov 06 12:14:06 2008 +0900
+++ b/xen/arch/ia64/vmx/vtlb.c  Thu Nov 06 12:14:57 2008 +0900
@@ -522,8 +522,7 @@ static u64 translate_phy_pte(VCPU *v, u6
      * which is required by vga acceleration since qemu maps shared
      * vram buffer with WB.
      */
-    if (mfn_valid((maddr & _PAGE_PPN_MASK) >> PAGE_SHIFT)
-                               && phy_pte.ma != VA_MATTR_NATPAGE)
+    if (mfn_valid(pte_pfn(__pte(pte))) && phy_pte.ma != VA_MATTR_NATPAGE)
         phy_pte.ma = VA_MATTR_WB;
 
     maddr = ((maddr & _PAGE_PPN_MASK) & PAGE_MASK) | (paddr & ~PAGE_MASK);
diff -r 958942c44332 -r f6795589ef82 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c      Thu Nov 06 12:14:06 2008 +0900
+++ b/xen/arch/ia64/xen/dom0_ops.c      Thu Nov 06 12:14:57 2008 +0900
@@ -800,7 +800,7 @@ do_dom0vp_op(unsigned long cmd,
             dprintk(XENLOG_INFO, "%s: INVALID_MFN ret: 0x%lx\n",
                      __func__, ret);
         } else {
-            ret = (ret & _PFN_MASK) >> PAGE_SHIFT;//XXX pte_pfn()
+            ret = pte_pfn(__pte(ret));
         }
         perfc_incr(dom0vp_phystomach);
         break;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] use pte_pfn() where possible, Xen patchbot-unstable <=