* [PATCH] earlycon: Fix __earlycon_table stride
@ 2015-04-03 12:57 Peter Hurley
0 siblings, 0 replies; only message in thread
From: Peter Hurley @ 2015-04-03 12:57 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, linux-serial, linux-kernel, linux-next, Yinghai Lu,
Peter Hurley
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>
---
include/asm-generic/vmlinux.lds.h | 2 +-
include/linux/serial_core.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 87e5b6f..561daf4 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -151,7 +151,7 @@
#endif
#ifdef CONFIG_SERIAL_EARLYCON
-#define EARLYCON_TABLE() . = ALIGN(8); \
+#define EARLYCON_TABLE() STRUCT_ALIGN(); \
VMLINUX_SYMBOL(__earlycon_table) = .; \
*(__earlycon_table) \
*(__earlycon_table_end)
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 34de168..025dad9 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -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,
--
2.3.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-03 12:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-03 12:57 [PATCH] earlycon: Fix __earlycon_table stride Peter Hurley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).