From b9023cd5dcba13ffbd21100230b75f1b15fe2d58 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 21 Oct 2003 18:24:00 -0700 Subject: [PATCH] [PATCH] v850: Don't reserve root-filesystem memory twice From: miles@lsi.nec.co.jp (Miles Bader) 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). --- arch/v850/kernel/as85ep1.c | 12 ------------ arch/v850/kernel/rte_me2_cb.c | 13 ------------- arch/v850/kernel/rte_nb85e_cb.c | 15 --------------- arch/v850/kernel/sim85e2.c | 15 --------------- 4 files changed, 55 deletions(-) diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c index 71b895f6aab7c..ccdb7fd23c612 100644 --- a/arch/v850/kernel/as85ep1.c +++ b/arch/v850/kernel/as85ep1.c @@ -114,22 +114,10 @@ void __init mach_get_physical_ram (unsigned long *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; - 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 --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c index 25ae5f6d01c3f..60c07c0a63f07 100644 --- a/arch/v850/kernel/rte_me2_cb.c +++ b/arch/v850/kernel/rte_me2_cb.c @@ -53,19 +53,6 @@ void __init mach_get_physical_ram (unsigned long *ram_start, *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 --git a/arch/v850/kernel/rte_nb85e_cb.c b/arch/v850/kernel/rte_nb85e_cb.c index 74074fb3a2f45..990b20bffe473 100644 --- a/arch/v850/kernel/rte_nb85e_cb.c +++ b/arch/v850/kernel/rte_nb85e_cb.c @@ -54,21 +54,6 @@ void __init mach_get_physical_ram (unsigned long *ram_start, *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 --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c index d35be73b84450..593998bb897e4 100644 --- a/arch/v850/kernel/sim85e2.c +++ b/arch/v850/kernel/sim85e2.c @@ -150,21 +150,6 @@ void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len) *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 -- 2.53.0