All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] CFG_64BIT_xxx and friends
Date: Mon, 08 Sep 2008 21:58:40 -0400	[thread overview]
Message-ID: <48C5D850.100@gmail.com> (raw)
In-Reply-To: <20080908142326.73df4141@hskinnemo-gx745.norway.atmel.com>

Haavard Skinnemoen wrote:
> Haavard Skinnemoen <haavard.skinnemoen@atmel.com> wrote:
>> That's a bit more than expected. Is this with or without --gc-sections?
>> Linking with --gc-sections should make simple_strtoull() go away unless
>> it's actually used.
> 
> That's assuming the fdt and image code doesn't interpret
> CFG_64BIT_VSPRINTF as CFG_BLOAT_ME_HARDER, which it does. So enabling
> CFG_64BIT_VSPRINTF does increase the code size even with --gc-sections.
> 
> I think fdt and common/image.c should stop abusing CFG_64BIT_VSPRINTF
> and get its own symbol instead, e.g. CFG_64BIT_PHYS_ADDR, and perhaps a
> nice str_to_addr() wrapper which selects between strtoul and strtoull
> based on this symbol.

Hi Haavard,

fdt and common.image.c don't use CFG_64BIT_VSPRINTF:

$ find . -name "*.c" | xargs grep CFG_64BIT_VSPRINTF
./disk/part.c:#if defined(CFG_64BIT_LBA) && defined(CFG_64BIT_VSPRINTF)
./common/cmd_ide.c:#if defined(CFG_64BIT_LBA) && defined(CFG_64BIT_VSPRINTF)
./common/cmd_ide.c:#if defined(CFG_64BIT_LBA) && defined(CFG_64BIT_VSPRINTF)
./lib_generic/vsprintf.c:#ifdef CFG_64BIT_VSPRINTF
./lib_generic/vsprintf.c:#ifdef CFG_64BIT_VSPRINTF
./lib_generic/vsprintf.c:#ifdef CFG_64BIT_VSPRINTF
./lib_generic/vsprintf.c:#ifdef CFG_64BIT_VSPRINTF

...they use CFG_64BIT_STRTOUL.  If a config defines CFG_64BIT_STRTOUL, 
it is reasonable that the code uses it.  I don't see any disadvantage of 
this vs. creating a new CFG_64BIT_PHYS_ADDR (although I would not object 
to that being created).

Only a select set of PowerPC targets actually define CFG_64BIT_STRTOUL:

$ find . -name "*.[ch]" | xargs grep CFG_64BIT_STRTOUL
./cpu/mpc85xx/mp.c:#ifdef CFG_64BIT_STRTOUL
./include/configs/MPC8540ADS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8572DS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8536DS.h:#define CFG_64BIT_STRTOUL		1
./include/configs/MPC8548CDS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8568MDS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8541CDS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8610HPCD.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8641HPCN.h:#define CFG_64BIT_STRTOUL	1
./include/configs/sbc8641d.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8555CDS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8560ADS.h:#define CFG_64BIT_STRTOUL	1
./include/configs/MPC8544DS.h:#define CFG_64BIT_STRTOUL		1
./include/ppc4xx.h:#define CFG_64BIT_STRTOUL
./common/cmd_fdt.c:#ifdef CFG_64BIT_STRTOUL
./common/cmd_fdt.c:#ifdef CFG_64BIT_STRTOUL
./common/image.c:#ifdef CFG_64BIT_STRTOUL
./lib_generic/vsprintf.c:#ifdef CFG_64BIT_STRTOUL
./lib_generic/vsprintf.c:#endif /* CFG_64BIT_STRTOUL */

[snip]

Best regards,
gvb

  reply	other threads:[~2008-09-09  1:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 14:09 [U-Boot] CFG_64BIT_xxx and friends Matthias Fuchs
2008-09-06 23:12 ` Wolfgang Denk
2008-09-06 23:05   ` Jean-Christophe PLAGNIOL-VILLARD
2008-09-06 23:37     ` Wolfgang Denk
2008-09-08  7:43       ` Stefan Roese
2008-09-08 11:00         ` Haavard Skinnemoen
2008-09-08 11:27           ` Matthias Fuchs
2008-09-08 11:54             ` Haavard Skinnemoen
2008-09-08 12:23               ` Haavard Skinnemoen
2008-09-09  1:58                 ` Jerry Van Baren [this message]
2008-09-09  7:11                   ` Haavard Skinnemoen

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=48C5D850.100@gmail.com \
    --to=gvb.uboot@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.