From: Simon Glass Date: Tue, 11 Aug 2015 02:44:29 +0000 (-0600) Subject: Align global_data to a 16-byte boundary X-Git-Tag: v2015.10-rc2~10^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2afddae07523f23f77acd066ad1719f53d289f98;p=platform%2Fkernel%2Fu-boot.git Align global_data to a 16-byte boundary Some archs like to have larger alignment for their global data. Use 16 bytes which suits all current archs. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/common/board_f.c b/common/board_f.c index 8cca4de..74f77f1 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -499,6 +499,7 @@ static int setup_machine(void) static int reserve_global_data(void) { gd->start_addr_sp -= sizeof(gd_t); + gd->start_addr_sp &= ~0xf; gd->new_gd = (gd_t *)map_sysmem(gd->start_addr_sp, sizeof(gd_t)); debug("Reserving %zu Bytes for Global Data at: %08lx\n", sizeof(gd_t), gd->start_addr_sp); diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 2155265..cc369fc 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -99,7 +99,8 @@ typedef struct global_data { int pcidelay_done; #endif struct udevice *cur_serial_dev; /* current serial device */ - struct arch_global_data arch; /* architecture-specific data */ + /* arch-specific data */ + struct arch_global_data arch __attribute__((aligned(16))); } gd_t; #endif