[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] rewrite of last util.c patch



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.