lkml.org 
[lkml]   [2003]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH][v850] Don't reserve root-filesystem memory twice on v850 platforms
Date
From
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.058 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site