[U-Boot] [PATCH v2] crc32: Impl. linux optimized crc32()

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Nov 19 13:31:18 CET 2009


Mike Frysinger <vapier at gentoo.org> wrote on 17/11/2009 05:06:02:
>
> On Monday 16 November 2009 23:01:59 Mike Frysinger wrote:
> > On Friday 13 November 2009 03:52:05 Joakim Tjernlund wrote:
> > > --- a/lib_generic/crc32.c
> > > +++ b/lib_generic/crc32.c
> > > @@ -13,6 +13,8 @@
> > >  #else
> > >  #include <stdint.h>
> > >  #endif
> > > +#include <asm/byteorder.h>
> > > +#include <u-boot/crc.h>
> >
> > the target system improvements are awesome, but this breaks cross-compiling
> > crc32 code for anything other than linux hosts (and even that is spotty).
> >
> > i'd suggest these changes
> >
> > @@ -10,10 +10,10 @@
> >
> >  #ifndef USE_HOSTCC   /* Shut down "ANSI does not permit..." warnings */
> >  #include <common.h>
> > +#include <asm/byteorder.h>
> >  #else
> > -#include <stdint.h>
> > +#include <compiler.h>
> >  #endif
> > -#include <asm/byteorder.h>
> >  #include <u-boot/crc.h>
>
> actually, now that i re-read what i put into compiler.h, even this header
> logic is more complex than it needs to be.  you should be able to have it
> simply read

Hi mike

Perhaps you can take a look at getting X_unaligned definitions
into compiler.h too?

I use get_unaligned() in the zlib patch I just sent:
 [PATCH RFC] zlib: Optimize decompression
Not sure if it is needed though, is zlib used in host env. too?

    Jocke



More information about the U-Boot mailing list