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-ia64-devel

Re: [Xen-ia64-devel] [PATCH] free initmem and add __init and __initdata.

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] free initmem and add __init and __initdata.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 22 May 2007 12:27:53 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 May 2007 20:26:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1179787573.27201.9.camel@lappy>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070518021433.GB30905%yamahata@xxxxxxxxxxxxx> <1179787573.27201.9.camel@lappy>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Mon, May 21, 2007 at 04:46:13PM -0600, Alex Williamson wrote:

> I tried removing all the __inits and __initdatas this patch added, but
> it still happens, so I'd guess we need something that upstream marked as
> init.  Thanks,

Thank you for testing.
I attached the updated patch. The diff from the previous one is as follows.

diff -r b2b0289b0575 -r be593e2059de xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Mon May 21 16:48:44 2007 +0900
+++ b/xen/arch/ia64/xen/xensetup.c      Tue May 22 12:07:48 2007 +0900
@@ -242,7 +242,7 @@ md_overlaps(efi_memory_desc_t *md, unsig
 
 #define MD_SIZE(md) (md->num_pages << EFI_PAGE_SHIFT)
 
-static void init_done(void)
+static void noinline init_done(void)
 {
     extern char __init_begin[], __init_end[];
     init_xenheap_pages(__pa(__init_begin), __pa(__init_end));


Probably the differece between your environment and mine is 
gcc version.
$ ia64-unknown-linux-gcc --version
ia64-unknown-linux-gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

Alghough I successfully booted xen with the following additional patch,
it may depend on how gcc optimises.
This patch would be also usefull for finding out what functions/data
shouldn't be thrown away.

diff -r be593e2059de -r 70eff30db786 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Tue May 22 12:07:48 2007 +0900
+++ b/xen/arch/ia64/xen/xensetup.c      Tue May 22 12:09:37 2007 +0900
@@ -245,6 +245,8 @@ static void noinline init_done(void)
 static void noinline init_done(void)
 {
     extern char __init_begin[], __init_end[];
+    memset(__init_begin, 0, __init_end - __init_begin);
+    flush_icache_range((unsigned long)__init_begin, (unsigned long)__init_end);
     init_xenheap_pages(__pa(__init_begin), __pa(__init_end));
     printk("Freed %ldkB init memory.\n",
            (long)(__init_end-__init_begin)>>10);


-- 
yamahata

Attachment: 15115_40e7ac2360f8_ia64_free_initmem.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel