The __earlycon_table lives in a special "__earlycon_table" section.  The
contents of this table are added using some macros that deposit individual
struct earlycon_id entries into this section.  The linker then defines a symbol
__earlycon_table that is supposed to contain the addresss of the first of these
entries.  The code in earlycon.c and fdt.c then tries to access the memory
pointed to by __earlycon_table as an array of struct earlycon_id entries.

Unfortunately, the compiler doesn't always place the entries such that they
are an array.  Let's fix that.

Patch 1 of the series is a fix that should hopefully fix a kbuild error that
seems to be triggered by Patch 2.

Daniel Kurtz (2):
  serial: sh-sci: Remove __initdata attribute for struct 'port_cfg'
  earlycon: Use a pointer table to fix __earlycon_table stride

 drivers/of/fdt.c                  |  7 +++++--
 drivers/tty/serial/earlycon.c     |  6 ++++--
 drivers/tty/serial/sh-sci.c       |  2 +-
 include/asm-generic/vmlinux.lds.h |  2 +-
 include/linux/serial_core.h       | 21 ++++++++++++++-------
 5 files changed, 25 insertions(+), 13 deletions(-)

-- 
2.16.2.804.g6dcf76e118-goog

Reply via email to