]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Align global_data to a 16-byte boundary
authorSimon Glass <sjg@chromium.org>
Tue, 11 Aug 2015 02:44:29 +0000 (20:44 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 08:23:20 +0000 (10:23 +0200)
Some archs like to have larger alignment for their global data. Use 16 bytes
which suits all current archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
common/board_f.c
include/asm-generic/global_data.h

index 7a95794882508d465905c7a363069ef73b351e17..84418a29b4c6f9425e3098b0626e7216ed14bbc3 100644 (file)
@@ -504,6 +504,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);
index 21552650025a108f4136267e4c63ea01584ea34c..cc369fcdfb9e3c7a628bb53a7a713d0d6a69f832 100644 (file)
@@ -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