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] Make use of PAGE_MASK and PAGE_ALI

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Make use of PAGE_MASK and PAGE_ALIGN()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Oct 2007 17:40:28 -0700
Delivery-date: Thu, 04 Oct 2007 18:29:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1190057905 21600
# Node ID b2a02f7ed849287da986673a8f2dacaa1671b101
# Parent  fdd298b75fb5c72c4e1387216de8e7e58584ca47
[IA64] Make use of PAGE_MASK and PAGE_ALIGN()

As suggested by Isaku Yamahata

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 xen/arch/ia64/xen/mm.c   |    2 +-
 xen/arch/ia64/xen/vhpt.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r fdd298b75fb5 -r b2a02f7ed849 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Mon Sep 17 13:26:19 2007 -0600
+++ b/xen/arch/ia64/xen/mm.c    Mon Sep 17 13:38:25 2007 -0600
@@ -524,7 +524,7 @@ u64 translate_domain_pte(u64 pteval, u64
 
        pteval2 = lookup_domain_mpa(d, mpaddr, entry);
        if (_itir.ps < PAGE_SHIFT)
-               pteval2 |= mpaddr & (PAGE_SIZE - 1) & ~((1L << _itir.ps) - 1);
+               pteval2 |= mpaddr & ~PAGE_MASK & ~((1L << _itir.ps) - 1);
 
        /* Check access rights.  */
        arflags  = pteval  & _PAGE_AR_MASK;
diff -r fdd298b75fb5 -r b2a02f7ed849 xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Mon Sep 17 13:26:19 2007 -0600
+++ b/xen/arch/ia64/xen/vhpt.c  Mon Sep 17 13:38:25 2007 -0600
@@ -293,10 +293,10 @@ __flush_vhpt_range(unsigned long vhpt_ma
 {
        void *vhpt_base = __va(vhpt_maddr);
        u64 pgsz = 1L << current->arch.vhpt_pg_shift;
-       u64 purge_addr = vadr & ~(PAGE_SIZE - 1);
+       u64 purge_addr = vadr & PAGE_MASK;
 
        addr_range += vadr - purge_addr;
-       addr_range = (addr_range + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
+       addr_range = PAGE_ALIGN(addr_range);
        while ((long)addr_range > 0) {
                /* Get the VHPT entry.  */
                unsigned int off = ia64_thash(purge_addr) -

_______________________________________________
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] Make use of PAGE_MASK and PAGE_ALIGN(), Xen patchbot-unstable <=