[PATCH][v850] Don't reserve root-filesystem memory twice on v850 platforms

From: Miles Bader
Date: Fri Oct 10 2003 - 04:26:20 EST


Linus, please apply.

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).

diff -ruN -X../cludes linux-2.6.0-test7-moo/arch/v850/kernel/as85ep1.c linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/as85ep1.c
--- linux-2.6.0-test7-moo/arch/v850/kernel/as85ep1.c 2003-10-09 11:54:16.000000000 +0900
+++ linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/as85ep1.c 2003-10-10 17:56:46.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-test7-moo/arch/v850/kernel/rte_me2_cb.c linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/rte_me2_cb.c
--- linux-2.6.0-test7-moo/arch/v850/kernel/rte_me2_cb.c 2003-07-28 10:13:58.000000000 +0900
+++ linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/rte_me2_cb.c 2003-10-10 18:01:48.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-test7-moo/arch/v850/kernel/rte_nb85e_cb.c linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/rte_nb85e_cb.c
--- linux-2.6.0-test7-moo/arch/v850/kernel/rte_nb85e_cb.c 2003-07-28 10:13:58.000000000 +0900
+++ linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/rte_nb85e_cb.c 2003-10-10 17:57:51.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-test7-moo/arch/v850/kernel/sim85e2.c linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/sim85e2.c
--- linux-2.6.0-test7-moo/arch/v850/kernel/sim85e2.c 2003-10-09 11:54:17.000000000 +0900
+++ linux-2.6.0-test7-moo-v850-20031010/arch/v850/kernel/sim85e2.c 2003-10-10 17:58:19.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/