From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Sat, 22 Aug 2009 11:45:54 -0500 Subject: [U-Boot] [PATCH 3/3] Consolidate arch-specific mem_malloc_init() implementations In-Reply-To: <20090822085428.GA11950@game.jcrosoft.org> References: <1250913921-15689-1-git-send-email-ptyser@xes-inc.com> <1250913921-15689-4-git-send-email-ptyser@xes-inc.com> <20090822085428.GA11950@game.jcrosoft.org> Message-ID: <4A9020C2.2040709@xes-inc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jean-Christophe PLAGNIOL-VILLARD wrote: > On 23:05 Fri 21 Aug , Peter Tyser wrote: >> Signed-off-by: Peter Tyser >> --- >> common/dlmalloc.c | 15 +++++++++++++++ >> include/malloc.h | 2 ++ >> lib_arm/board.c | 10 ---------- >> lib_avr32/board.c | 15 ++------------- >> lib_blackfin/board.c | 9 --------- >> lib_m68k/board.c | 14 +------------- >> lib_microblaze/board.c | 20 +++++--------------- >> lib_mips/board.c | 14 +------------- >> lib_nios/board.c | 14 ++------------ >> lib_nios2/board.c | 14 ++------------ >> lib_ppc/board.c | 14 +------------- >> lib_sh/board.c | 9 --------- >> lib_sparc/board.c | 21 +-------------------- >> 13 files changed, 32 insertions(+), 139 deletions(-) >> >> diff --git a/common/dlmalloc.c b/common/dlmalloc.c >> index f3bced4..241db8c 100644 >> --- a/common/dlmalloc.c >> +++ b/common/dlmalloc.c >> @@ -1520,6 +1520,21 @@ void *sbrk(ptrdiff_t increment) >> return (void *)old; >> } >> >> +#ifndef CONFIG_X86 > could we have a generic name (not arch) > CONFIG_GENERIC_MALLOC_INIT > > and then define it in the configs/arch.h I thought the cleanest fix would be to update the x86 call to mem_malloc_init() to match all the other architectures', but didn't want to delve into the x86 arch init code. I think adding a new CONFIG_* option to handle 1 non-conforming architecture is dirtier than syncing up the x86 init code in any case. Best, Peter