All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: cleanup reloated_initrd
Date: Fri, 13 Jun 2008 20:07:03 -0700	[thread overview]
Message-ID: <200806132007.03576.yhlu.kernel@gmail.com> (raw)
In-Reply-To: <200806132005.45836.yhlu.kernel@gmail.com>


1. move that before zone_sizes_init ...
2. add free_early for one old one, otherwise it will be be reserved again when
   init highmem.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup_32.c
+++ linux-2.6/arch/x86/kernel/setup_32.c
@@ -585,6 +585,9 @@ static void __init relocate_initrd(void)
 	printk(KERN_INFO "Copied RAMDISK from %016llx - %016llx to %08llx - %08llx\n",
 		ramdisk_image, ramdisk_image + ramdisk_size - 1,
 		ramdisk_here, ramdisk_here + ramdisk_size - 1);
+
+	/* need to free that, otherwise init highmem will reserve it again */
+	free_early(ramdisk_image, ramdisk_image+ramdisk_size);
 }
 
 #endif /* CONFIG_BLK_DEV_INITRD */
@@ -813,10 +816,6 @@ void __init setup_arch(char **cmdline_p)
 		init_ohci1394_dma_on_all_controllers();
 #endif
 
-	remapped_pgdat_init();
-	sparse_init();
-	zone_sizes_init();
-
 	/*
 	 * NOTE: at this point the bootmem allocator is fully available.
 	 */
@@ -825,6 +824,10 @@ void __init setup_arch(char **cmdline_p)
 	relocate_initrd();
 #endif
 
+	remapped_pgdat_init();
+	sparse_init();
+	zone_sizes_init();
+
 	paravirt_post_allocator_init();
 
 	dmi_scan_machine();

  reply	other threads:[~2008-06-14  3:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-14  3:05 [PATCH] x86: replace shrink pages with remove_active_ranges v2 Yinghai Lu
2008-06-14  3:07 ` Yinghai Lu [this message]
2008-06-14  8:28   ` [PATCH] x86: cleanup reloated_initrd Ingo Molnar
2008-06-14 18:41   ` H. Peter Anvin
2008-06-14 19:27     ` Yinghai Lu
2008-06-14 19:39       ` H. Peter Anvin
2008-06-14 22:08         ` Yinghai Lu
2008-06-14  6:23 ` [PATCH] x86: replace shrink pages with remove_active_ranges v2 Ingo Molnar
2008-06-14  7:56 ` [PATCH] x86: use add_highpages_with_active_regions for high pages init Yinghai Lu
2008-06-14  8:23   ` Ingo Molnar
2008-06-14  8:50     ` Ingo Molnar
2008-06-14  8:59       ` Ingo Molnar
2008-06-14  9:05     ` Yinghai Lu
2008-06-16  1:20       ` Huang, Ying
2008-06-16  3:46         ` Yinghai Lu
2008-06-16  4:39           ` Yinghai Lu
2008-06-16  5:37           ` Huang, Ying
2008-06-16  5:38             ` H. Peter Anvin
2008-06-16  5:43               ` Yinghai Lu
2008-06-16  5:45               ` Huang, Ying
2008-06-15  1:32   ` [PATCH] x86: use add_highpages_with_active_regions for high pages init v2 Yinghai Lu
2008-06-16  8:09     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806132007.03576.yhlu.kernel@gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.