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] [POWERPC][XEN] Clean up init_frame_table(

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC][XEN] Clean up init_frame_table()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Sep 2006 10:03:32 +0000
Delivery-date: Tue, 19 Sep 2006 03:06:26 -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 Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 33266be3c635d3775a4035bb52167c5b310d8296
# Parent  2b8660a8a9bc402a21c6130c05e73f6ce2fb9a38
[POWERPC][XEN] Clean up init_frame_table()

figure out its size correctly and remove unused global

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/mm.c        |   18 ++++++++++--------
 xen/include/asm-powerpc/mm.h |    2 --
 2 files changed, 10 insertions(+), 10 deletions(-)

diff -r 2b8660a8a9bc -r 33266be3c635 xen/arch/powerpc/mm.c
--- a/xen/arch/powerpc/mm.c     Mon Sep 18 13:21:39 2006 -0500
+++ b/xen/arch/powerpc/mm.c     Thu Sep 14 14:20:48 2006 -0400
@@ -39,7 +39,6 @@
 
 /* Frame table and its size in pages. */
 struct page_info *frame_table;
-unsigned long frame_table_size;
 unsigned long max_page;
 unsigned long total_pages;
 
@@ -190,17 +189,20 @@ void __init init_frametable(void)
 void __init init_frametable(void)
 {
     unsigned long p;
-
-    frame_table_size = PFN_UP(max_page * sizeof(struct page_info));
-
-    p = alloc_boot_pages(min(frame_table_size, 4UL << 20), 1);
+    unsigned long nr_pages;
+    int i;
+
+    nr_pages = PFN_UP(max_page * sizeof(struct page_info));
+    nr_pages = min(nr_pages, (4UL << (20 - PAGE_SHIFT)));
+    
+
+    p = alloc_boot_pages(nr_pages, 1);
     if (p == 0)
         panic("Not enough memory for frame table\n");
 
     frame_table = (struct page_info *)(p << PAGE_SHIFT);
-    frame_table_size = (frame_table_size + PAGE_SIZE - 1) & PAGE_MASK;
-
-    memset(frame_table, 0, frame_table_size);
+    for (i = 0; i < nr_pages; i += 1)
+        clear_page((void *)((p + i) << PAGE_SHIFT));
 }
 
 long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
diff -r 2b8660a8a9bc -r 33266be3c635 xen/include/asm-powerpc/mm.h
--- a/xen/include/asm-powerpc/mm.h      Mon Sep 18 13:21:39 2006 -0500
+++ b/xen/include/asm-powerpc/mm.h      Thu Sep 14 14:20:48 2006 -0400
@@ -229,8 +229,6 @@ extern vm_assist_info_t vm_assist_info[]
 #define share_xen_page_with_guest(p, d, r) do { } while (0)
 #define share_xen_page_with_privileged_guests(p, r) do { } while (0)
 
-extern unsigned long frame_table_size;
-
 /* hope that accesses to this will fail spectacularly */
 #define machine_to_phys_mapping ((u32 *)-1UL)
 

_______________________________________________
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] [POWERPC][XEN] Clean up init_frame_table(), Xen patchbot-unstable <=