All of lore.kernel.org
 help / color / mirror / Atom feed
From: miles@lsi.nec.co.jp (Miles Bader)
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][v850]  Don't reserve root-filesystem memory twice on v850 platforms
Date: Mon, 20 Oct 2003 16:21:57 +0900 (JST)	[thread overview]
Message-ID: <20031020072157.8AD203723@mcspd15.ucom.lsi.nec.co.jp> (raw)

This reservation is handled by platform-independent code in 2.6.0, but some
platforms _also_ did it in platform-specific code (left over from 2.4.x).

[Please apply -- this problem prevents these platforms from booting.]

diff -ruN -X../cludes linux-2.6.0-test8-uc0/arch/v850/kernel/as85ep1.c linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/as85ep1.c
--- linux-2.6.0-test8-uc0/arch/v850/kernel/as85ep1.c	2003-10-09 11:54:16.000000000 +0900
+++ linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/as85ep1.c	2003-10-20 13:47:42.000000000 +0900
@@ -114,22 +114,10 @@
 
 void __init mach_reserve_bootmem ()
 {
-	extern char _root_fs_image_start, _root_fs_image_end;
-	u32 root_fs_image_start = (u32)&_root_fs_image_start;
-	u32 root_fs_image_end = (u32)&_root_fs_image_end;
-
 	if (SDRAM_ADDR < RAM_END && SDRAM_ADDR > RAM_START)
 		/* We can't use the space between SRAM and SDRAM, so
 		   prevent the kernel from trying.  */
 		reserve_bootmem (SRAM_END, SDRAM_ADDR - SRAM_END);
-
-	/* Reserve the memory used by the root filesystem image if it's
-	   in RAM.  */
-	if (root_fs_image_end > root_fs_image_start
-	    && root_fs_image_start >= RAM_START
-	    && root_fs_image_start < RAM_END)
-		reserve_bootmem (root_fs_image_start,
-				 root_fs_image_end - root_fs_image_start);
 }
 
 void mach_gettimeofday (struct timespec *tv)
diff -ruN -X../cludes linux-2.6.0-test8-uc0/arch/v850/kernel/rte_me2_cb.c linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/rte_me2_cb.c
--- linux-2.6.0-test8-uc0/arch/v850/kernel/rte_me2_cb.c	2003-07-28 10:13:58.000000000 +0900
+++ linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/rte_me2_cb.c	2003-10-20 13:47:42.000000000 +0900
@@ -53,19 +53,6 @@
 	*ram_len = RAM_END - RAM_START;
 }
 
-void __init mach_reserve_bootmem ()
-{
-	extern char _root_fs_image_start, _root_fs_image_end;
-	u32 root_fs_image_start = (u32)&_root_fs_image_start;
-	u32 root_fs_image_end = (u32)&_root_fs_image_end;
-
-	/* Reserve the memory used by the root filesystem image if it's
-	   in RAM.  */
-	if (root_fs_image_start >= RAM_START && root_fs_image_start < RAM_END)
-		reserve_bootmem (root_fs_image_start,
-				 root_fs_image_end - root_fs_image_start);
-}
-
 void mach_gettimeofday (struct timespec *tv)
 {
 	tv->tv_sec = 0;
diff -ruN -X../cludes linux-2.6.0-test8-uc0/arch/v850/kernel/rte_nb85e_cb.c linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/rte_nb85e_cb.c
--- linux-2.6.0-test8-uc0/arch/v850/kernel/rte_nb85e_cb.c	2003-07-28 10:13:58.000000000 +0900
+++ linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/rte_nb85e_cb.c	2003-10-20 13:47:42.000000000 +0900
@@ -54,21 +54,6 @@
 	*ram_len = SDRAM_SIZE;
 }
 
-void __init mach_reserve_bootmem ()
-{
-	extern char _root_fs_image_start, _root_fs_image_end;
-	u32 root_fs_image_start = (u32)&_root_fs_image_start;
-	u32 root_fs_image_end = (u32)&_root_fs_image_end;
-
-	/* Reserve the memory used by the root filesystem image if it's
-	   in SDRAM.  */
-	if (root_fs_image_end > root_fs_image_start
-	    && root_fs_image_start >= SDRAM_ADDR
-	    && root_fs_image_start < (SDRAM_ADDR + SDRAM_SIZE))
-		reserve_bootmem (root_fs_image_start,
-				 root_fs_image_end - root_fs_image_start);
-}
-
 void mach_gettimeofday (struct timespec *tv)
 {
 	tv->tv_sec = 0;
diff -ruN -X../cludes linux-2.6.0-test8-uc0/arch/v850/kernel/sim85e2.c linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/sim85e2.c
--- linux-2.6.0-test8-uc0/arch/v850/kernel/sim85e2.c	2003-10-09 11:54:17.000000000 +0900
+++ linux-2.6.0-test8-uc0-v850-20031020/arch/v850/kernel/sim85e2.c	2003-10-20 13:47:42.000000000 +0900
@@ -150,21 +150,6 @@
 	*ram_len = RAM_END - RAM_START;
 }
 
-void __init mach_reserve_bootmem ()
-{
-	extern char _root_fs_image_start, _root_fs_image_end;
-	u32 root_fs_image_start = (u32)&_root_fs_image_start;
-	u32 root_fs_image_end = (u32)&_root_fs_image_end;
-
-	/* Reserve the memory used by the root filesystem image if it's
-	   in RAM.  */
-	if (root_fs_image_end > root_fs_image_start
-	    && root_fs_image_start >= RAM_START
-	    && root_fs_image_start < RAM_END)
-		reserve_bootmem (root_fs_image_start,
-				 root_fs_image_end - root_fs_image_start);
-}
-
 void __init mach_sched_init (struct irqaction *timer_action)
 {
 	/* The simulator actually cycles through all interrupts

             reply	other threads:[~2003-10-20  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-20  7:21 Miles Bader [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-10  9:22 [PATCH][v850] Don't reserve root-filesystem memory twice on v850 platforms Miles Bader

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=20031020072157.8AD203723@mcspd15.ucom.lsi.nec.co.jp \
    --to=miles@lsi.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles@gnu.org \
    --cc=torvalds@osdl.org \
    /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.