Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752987AbbDCM6Q (ORCPT ); Fri, 3 Apr 2015 08:58:16 -0400 Received: from mail-qc0-f170.google.com ([209.85.216.170]:33930 "EHLO mail-qc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752789AbbDCM6N (ORCPT ); Fri, 3 Apr 2015 08:58:13 -0400 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, Yinghai Lu , Peter Hurley Subject: [PATCH] earlycon: Fix __earlycon_table stride Date: Fri, 3 Apr 2015 08:57:51 -0400 Message-Id: <1428065871-17281-1-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1586 Lines: 46 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 Signed-off-by: Peter Hurley --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/