From 1f391c34547e79391ad4b167d68351521c49c6d0 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 10 Sep 2021 22:47:10 +0200 Subject: lmb: Switch to generic arch_lmb_reserve_generic() Switch arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() to arch_lmb_reserve_generic(). Reviewed-by: Tom Rini Signed-off-by: Marek Vasut Cc: Alexey Brodkin Cc: Angelo Dureghello Cc: Daniel Schwierzeck Cc: Eugeniy Paltsev Cc: Hai Pham Cc: Michal Simek Cc: Simon Goldschmidt Cc: Tom Rini Cc: Wolfgang Denk --- arch/arc/lib/cache.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'arch/arc/lib/cache.c') diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c index 4ba180482c..4c696cb53a 100644 --- a/arch/arc/lib/cache.c +++ b/arch/arc/lib/cache.c @@ -832,21 +832,5 @@ static ulong get_sp(void) void arch_lmb_reserve(struct lmb *lmb) { - ulong sp; - - /* - * Booting a (Linux) kernel image - * - * Allocate space for command line and board info - the - * address should be as high as possible within the reach of - * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused - * memory, which means far enough below the current stack - * pointer. - */ - sp = get_sp(); - debug("## Current stack ends at 0x%08lx ", sp); - - /* adjust sp by 4K to be safe */ - sp -= 4096; - lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp)); + arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096); } -- cgit v1.2.3