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] rewrite of last util.c patch

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] rewrite of last util.c patch
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 22:20:18 +0000
Delivery-date: Wed, 09 Aug 2006 15:23:27 -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 awilliam@xxxxxxxxxxx
# Node ID 86ff604d8e2047446075b75574db490f9731f7f8
# Parent  aa9d157d76378e6273fab62c110ec7c2cbd4d35e
[IA64] rewrite of last util.c patch

Rewrite utils.c patch to be less ugly:
do not set area->phys_addr, recompute phys_addr in free_vm_area.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 linux-2.6-xen-sparse/arch/ia64/xen/util.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff -r aa9d157d7637 -r 86ff604d8e20 linux-2.6-xen-sparse/arch/ia64/xen/util.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/util.c Mon Jul 31 13:10:39 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/util.c Mon Jul 31 13:12:30 2006 -0600
@@ -54,7 +54,7 @@ struct vm_struct *alloc_vm_area(unsigned
         area->size = size;
         area->pages = NULL; //XXX
         area->nr_pages = nr_pages;
-        area->phys_addr = __pa(virt);
+        area->phys_addr = 0;   /* xenbus_map_ring_valloc uses this field!  */
 
        return area;
 
@@ -70,15 +70,13 @@ void free_vm_area(struct vm_struct *area
 {
        unsigned int order = get_order(area->size);
        unsigned long i;
-
-       /* xenbus_map_ring_valloc overrides this field!  */
-       area->phys_addr = __pa(area->addr);
+       unsigned long phys_addr = __pa(area->addr);
 
        // This area is used for foreign page mappping.
        // So underlying machine page may not be assigned.
        for (i = 0; i < (1 << order); i++) {
                unsigned long ret;
-               unsigned long gpfn = (area->phys_addr >> PAGE_SHIFT) + i;
+               unsigned long gpfn = (phys_addr >> PAGE_SHIFT) + i;
                struct xen_memory_reservation reservation = {
                        .nr_extents   = 1,
                        .address_bits = 0,

_______________________________________________
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] rewrite of last util.c patch, Xen patchbot-unstable <=