[U-Boot] [PATCH 3/3] Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value
Stefan Roese
sr at denx.de
Tue Oct 26 16:22:57 CEST 2010
Hi Wolfgang,
On Tuesday 26 October 2010 16:00:01 Wolfgang Denk wrote:
> CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not
> being able to use "sizeof(struct global_data)" in assembler files.
> Recent experience has shown that manual synchronization is not
> reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into
> GENERATED_GBL_DATA_SIZE which gets automatically generated by the
> asm-offsets tool. In the result, all definitions of this value can be
> deleted from the board config files. We have to make sure that all
> files that reference such data include the new <asm-offsets.h> file.
>
> No other changes have been done yet, but it is obvious that similar
> changes / simplifications can be done for other, related macro
> definitions as well.
Nice. Thanks all for this work.
One thing that comes to my mind while looking into this patchset is, if we
need to make sure that the replacement for CONFIG_SYS_GBL_DATA_SIZE is (still)
aligned. Till now CONFIG_SYS_GBL_DATA_SIZE has been defined mostly to
something like 64/128/256. Now with using sizeof(struct global_data) this is
may not the case any more. Perhaps I'm missing something (didn't look through
the patchset too closely), but shouldn't we make sure that the new values used
for the memory-reservation is at least 4-byte aligned?
Thanks.
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