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

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



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

 


Rackspace

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