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

[Xen-changelog] [xen-unstable] [IA64] fix relinquish_memory()



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1234519417 -32400
# Node ID 9b761ae54610be67ff6e244eccf8c2b2c835b78e
# Parent  726b56720b16e5e0effe24fbddac78d8af4c2125
[IA64] fix relinquish_memory()

This patch fixes the following panic.

(XEN) Assertion 'entry->prev->next == entry' failed, line 170, file 
xen-unstable.hg/xen/include/xen/list.h
(XEN) Xen BUG at xen-unstable.hg/xen/include/xen/list.h:170
(XEN) FIXME: implement ia64 dump_execution_state()
(XEN)
(XEN) Call Trace:
(XEN)  [<f400000004104670>] show_stack+0x90/0xb0
(XEN)                                 sp=f0000002f64cfbf0 bsp=f0000002f64c9918
(XEN)  [<f400000004105180>] dump_stack+0x30/0x50
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c98f8
(XEN)  [<f400000004064ac0>] __bug+0x70/0xa0
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c98c8
(XEN)  [<f400000004031290>] free_domheap_pages+0x380/0x700
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c9868
(XEN)  [<f4000000040ac470>] domain_page_flush_and_put+0x1c0/0x550
(XEN)                                 sp=f0000002f64cfdc0 bsp=f0000002f64c9820
(XEN)  [<f4000000040ac990>] domain_put_page+0x190/0x530
(XEN)                                 sp=f0000002f64cfdd0 bsp=f0000002f64c97b0
(XEN)  [<f4000000040ad060>] zap_domain_page_one+0x330/0x530
(XEN)                                 sp=f0000002f64cfde0 bsp=f0000002f64c9710
(XEN)  [<f4000000040ad570>] dom0vp_zap_physmap+0x70/0xe0
(XEN)                                 sp=f0000002f64cfdf0 bsp=f0000002f64c96d8
(XEN)  [<f4000000040838f0>] do_dom0vp_op+0x320/0x7b0
(XEN)                                 sp=f0000002f64cfdf0 bsp=f0000002f64c9690
(XEN)  [<f400000004002e60>] fast_hypercall+0x170/0x310
(XEN)                                 sp=f0000002f64cfe00 bsp=f0000002f64c9690
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 2:
(XEN) Xen BUG at xen-unstable.hg/xen/include/xen/list.h:170
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...
(XEN) Debugging connection not set up.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/domain.c |    8 +-------
 xen/include/asm-ia64/mm.h  |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 7 deletions(-)

diff -r 726b56720b16 -r 9b761ae54610 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Fri Feb 13 11:23:16 2009 +0900
+++ b/xen/arch/ia64/xen/domain.c        Fri Feb 13 19:03:37 2009 +0900
@@ -1705,13 +1705,7 @@ static int relinquish_memory(struct doma
         }
     }
 
-    /* list is empty at this point. */
-    if ( !page_list_empty(&d->arch.relmem_list) )
-    {
-        *list = d->arch.relmem_list;
-        INIT_PAGE_LIST_HEAD(&d->arch.relmem_list);
-    }
-
+    page_list_splice_init(&d->arch.relmem_list, list);
 
  out:
     spin_unlock_recursive(&d->page_alloc_lock);
diff -r 726b56720b16 -r 9b761ae54610 xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h Fri Feb 13 11:23:16 2009 +0900
+++ b/xen/include/asm-ia64/mm.h Fri Feb 13 19:03:37 2009 +0900
@@ -91,6 +91,24 @@ struct page_info
     /* Timestamp from 'TLB clock', used to reduce need for safety flushes. */
     u32 tlbflush_timestamp;
 };
+
+#ifndef page_list_entry
+static inline void
+page_list_splice_init(struct page_list_head *list, struct page_list_head *head)
+{
+    if ( !page_list_empty(list) )
+    {
+        if ( head->next )
+            head->tail->list.next = page_to_mfn(list->next);
+        else
+            head->next = list->next;
+        head->tail = list->tail;
+        INIT_PAGE_LIST_HEAD(list);
+    }
+}
+#else
+# define page_list_splice_init list_splice_init
+#endif
 
 #define set_page_count(p,v)    atomic_set(&(p)->_count, v - 1)
 

_______________________________________________
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®.