[U-Boot] fls definition issue

Stefan Roese sr at denx.de
Thu Sep 17 14:00:44 CEST 2009


On Thursday 17 September 2009 13:47:58 Hu Mingkai-B21284 wrote:
> I traced the code and found the variable law_sz_enc got an
> error value when call __ilog2_u64 in the function set_ddr_laws.
> 
> The inline function __ilog2_u64 will call fls inline function
> finally, but the fls is defined as a variable by the commit
> 52d61227b66d4099b39c8309ab37cb67ee09a405 in the platform specific
> bitops.h file.
> 
> include/asm-ppc/bitops.h:
> static __inline__ int fls(unsigned int x)
> {
>         return __ilog2(x) + 1;
> }
> #define fls
> 
> So when called fls, which one will be used?
> From the experiments, I got the latter called, but I don't find
> the root reason, any clues?

This problem is already known, and Simon (on Cc) is currently working on a 
patch to fix it. Should be ready this afternoon...
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de


More information about the U-Boot mailing list