earlycon: Fix __earlycon_table stride
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 3 Apr 2015 12:57:51 +0000 (08:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Apr 2015 12:39:53 +0000 (14:39 +0200)
The compiler and the linker must agree on the alignment of
struct earlycon_id; empirical testing and commit 07fca0e57fca92
("tracing: Properly align linker defined symbols") suggests
32-byte alignment is the LCD.

Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/asm-generic/vmlinux.lds.h
include/linux/serial_core.h

index 87e5b6f8f4fc742b3d753da2d873e5268aa36515..561daf49e52f78687184192207379821f4307cf3 100644 (file)
 #endif
 
 #ifdef CONFIG_SERIAL_EARLYCON
-#define EARLYCON_TABLE() . = ALIGN(8);                         \
+#define EARLYCON_TABLE() STRUCT_ALIGN();                       \
                         VMLINUX_SYMBOL(__earlycon_table) = .;  \
                         *(__earlycon_table)                    \
                         *(__earlycon_table_end)
index 34de16840152b47cef60d05a115ba550d9792323..025dad9dcde4edaacbb51e52d138c7f28b621458 100644 (file)
@@ -342,7 +342,7 @@ struct earlycon_device {
 struct earlycon_id {
        char    name[16];
        int     (*setup)(struct earlycon_device *, const char *options);
-};
+} __aligned(32);
 
 extern int setup_earlycon(char *buf);
 extern int of_setup_earlycon(unsigned long addr,