public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] fls definition issue
Date: Thu, 17 Sep 2009 14:00:44 +0200	[thread overview]
Message-ID: <200909171400.44848.sr@denx.de> (raw)
In-Reply-To: <73839B4A0818E747864426270AC332C30451381F@zmy16exm20.fsl.freescale.net>

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

      reply	other threads:[~2009-09-17 12:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 11:47 [U-Boot] fls definition issue Hu Mingkai-B21284
2009-09-17 12:00 ` Stefan Roese [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909171400.44848.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox