Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-07-25 Thread Wolfgang Denk
Dear Matthias Weisser, In message <1306141435-24001-1-git-send-email-weiss...@arcor.de> you wrote: > In some cases (e.g. bootm with a elf payload which is already at the right > position) there is a in place copy of data to the same address. Catching this > saves some ms while booting. > > Signed

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-06-29 Thread Matthias Weißer
Dear Wolfgang Am 14.06.2011 08:18, schrieb Matthias Weißer: > Am 23.05.2011 11:03, schrieb Matthias Weisser: >> In some cases (e.g. bootm with a elf payload which is already at the right >> position) there is a in place copy of data to the same address. Catching this >> saves some ms while booting

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-06-16 Thread Matthias Weisser
Am 14.06.2011 08:18, schrieb Matthias Weißer: > Hello Wolfgang > > Am 23.05.2011 11:03, schrieb Matthias Weisser: >> In some cases (e.g. bootm with a elf payload which is already at the right >> position) there is a in place copy of data to the same address. Catching this >> saves some ms while bo

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-06-13 Thread Matthias Weißer
Hello Wolfgang Am 23.05.2011 11:03, schrieb Matthias Weisser: > In some cases (e.g. bootm with a elf payload which is already at the right > position) there is a in place copy of data to the same address. Catching this > saves some ms while booting. What about this patch? As the initial submissio

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-24 Thread Wolfgang Denk
Dear Scott Wood, In message <20110524143749.0b508...@schlenkerla.am.freescale.net> you wrote: > > Might want to pass -fno-delete-null-pointer-checks... Thanks for pointing out. > As for memcpy/memmove, if in U-Boot it's to be legal to pass overlapping > regions to memcpy(), why have separate imp

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-24 Thread Scott Wood
On Tue, 24 May 2011 00:22:49 +0200 Wolfgang Denk wrote: > Dear Alexander Holler, > > In message <4ddadbb6.30...@ahsoftware.de> you wrote: > > > > So you I will look forward to checks for NULL pointers and similiar in > > all C standard functions implemented in u-boot to circumvent tons of > >

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-24 Thread Alexander Holler
Am 24.05.2011 05:47, schrieb Mike Frysinger: >> I've never seen a valid use of strcpy() with a null-pointer in real >> world programs, which we are talking about, except in bugs. > > i'm lazy and type "0" all the time for loading files, copying memory, > displaying things, etc... in u-boot. i don

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Mike Frysinger
On Monday, May 23, 2011 18:38:49 Alexander Holler wrote: > Am 24.05.2011 00:22, schrieb Wolfgang Denk: > > Alexander Holler wrote: > >> So you I will look forward to checks for NULL pointers and similiar in > >> all C standard functions implemented in u-boot to circumvent tons of > >> possible real

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Alexander Holler
Am 24.05.2011 00:22, schrieb Wolfgang Denk: > Dear Alexander Holler, > > In message<4ddadbb6.30...@ahsoftware.de> you wrote: >> >> So you I will look forward to checks for NULL pointers and similiar in >> all C standard functions implemented in u-boot to circumvent tons of >> possible real world b

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Wolfgang Denk
Dear Alexander Holler, In message <4ddadbb6.30...@ahsoftware.de> you wrote: > > So you I will look forward to checks for NULL pointers and similiar in > all C standard functions implemented in u-boot to circumvent tons of > possible real world bugs in all callers of strcpy, strlen, mem* and > w

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Alexander Holler
Am 23.05.2011 23:55, schrieb Wolfgang Denk: > Dear Alexander Holler, > > In message<4ddacc8b.6090...@ahsoftware.de> you wrote: >> >>> --- a/lib/string.c >>> +++ b/lib/string.c >>> @@ -467,6 +467,9 @@ void * memcpy(void *dest, const void *src, size_t count) >>> unsigned long *dl = (unsigned lon

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Wolfgang Denk
Dear Alexander Holler, In message <4ddacc8b.6090...@ahsoftware.de> you wrote: > > > --- a/lib/string.c > > +++ b/lib/string.c > > @@ -467,6 +467,9 @@ void * memcpy(void *dest, const void *src, size_t count) > > unsigned long *dl = (unsigned long *)dest, *sl = (unsigned long *)src; > > cha

Re: [U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Alexander Holler
Hello, Am 23.05.2011 11:03, schrieb Matthias Weisser: > In some cases (e.g. bootm with a elf payload which is already at the right > position) there is a in place copy of data to the same address. Catching this > saves some ms while booting. > > Signed-off-by: Matthias Weisser > --- > Changes sinc

[U-Boot] [PATCH V2] memcpy/memmove: Do not copy to same address

2011-05-23 Thread Matthias Weisser
In some cases (e.g. bootm with a elf payload which is already at the right position) there is a in place copy of data to the same address. Catching this saves some ms while booting. Signed-off-by: Matthias Weisser --- Changes since V1: - Made subject more informative - Removed the optimizatio