
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.
Signed-off-by: Wolfgang Denk wd@denx.de --- v2: round global data size up to a multiple of 16 to guarantee sufficient alignment of the initial stack.
... [other files unchanged, suppressed to reduce size] ... lib/asm-offsets.c | 4 ++++ 560 files changed, 519 insertions(+), 955 deletions(-)
... [other files unchanged, suppressed to reduce size] ...
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c index 4eb6174..0bc70ab 100644 --- a/lib/asm-offsets.c +++ b/lib/asm-offsets.c @@ -21,5 +21,9 @@
int main(void) { + /* Round up to make sure size gives nice stack alignment */ + DEFINE(GENERATED_GBL_DATA_SIZE, + (sizeof(struct global_data)+15) & ~15); + return 0; }