All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vegard Nossum <vegard.nossum@oracle.com>
To: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Luis R . Rodriguez" <mcgrof@kernel.org>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH 10/12] serial_core: declare __earlycon_table{,_end} as external array
Date: Sun, 16 Oct 2016 17:16:14 +0200	[thread overview]
Message-ID: <20161016151616.31451-11-vegard.nossum@oracle.com> (raw)
In-Reply-To: <20161016151616.31451-1-vegard.nossum@oracle.com>

Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
 drivers/of/fdt.c                  | 2 +-
 drivers/tty/serial/earlycon.c     | 2 +-
 include/asm-generic/vmlinux.lds.h | 8 ++++----
 include/linux/serial_core.h       | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index c89d5d2..eb41e3d 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -956,7 +956,7 @@ int __init early_init_dt_scan_chosen_stdout(void)
 		return 0;
 	}
 
-	for (match = __earlycon_table; match < __earlycon_table_end; match++) {
+	ext_for_each(match, earlycon_table) {
 		if (!match->compatible[0])
 			continue;
 
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index c365154..f49cfed 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -180,7 +180,7 @@ int __init setup_earlycon(char *buf)
 	if (early_con.flags & CON_ENABLED)
 		return -EALREADY;
 
-	for (match = __earlycon_table; match < __earlycon_table_end; match++) {
+	ext_for_each(match, earlycon_table) {
 		size_t len = strlen(match->name);
 
 		if (strncmp(buf, match->name, len))
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index d6121ac..342c2dd 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -154,10 +154,10 @@
 #endif
 
 #ifdef CONFIG_SERIAL_EARLYCON
-#define EARLYCON_TABLE() STRUCT_ALIGN();			\
-			 VMLINUX_SYMBOL(__earlycon_table) = .;	\
-			 *(__earlycon_table)			\
-			 VMLINUX_SYMBOL(__earlycon_table_end) = .;
+#define EARLYCON_TABLE() STRUCT_ALIGN();				\
+			 VMLINUX_SYMBOL(__start_earlycon_table) = .;	\
+			 *(__earlycon_table)				\
+			 VMLINUX_SYMBOL(__stop_earlycon_table) = .;
 #else
 #define EARLYCON_TABLE()
 #endif
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 3442014..2d35e87 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -22,6 +22,7 @@
 
 
 #include <linux/compiler.h>
+#include <linux/extarray.h>
 #include <linux/interrupt.h>
 #include <linux/circ_buf.h>
 #include <linux/spinlock.h>
@@ -349,8 +350,7 @@ struct earlycon_id {
 	int	(*setup)(struct earlycon_device *, const char *options);
 } __aligned(32);
 
-extern const struct earlycon_id __earlycon_table[];
-extern const struct earlycon_id __earlycon_table_end[];
+DECLARE_EXTARRAY(const struct earlycon_id, earlycon_table);
 
 #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
 #define EARLYCON_USED_OR_UNUSED	__used
-- 
2.10.0.479.g221bd91

  parent reply	other threads:[~2016-10-16 15:58 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-16 15:16 [PATCH 00/12] external array access helpers Vegard Nossum
2016-10-16 15:16 ` [PATCH 01/12] extarray: define helpers for arrays defined in linker scripts Vegard Nossum
2016-10-17  7:04   ` Greg Kroah-Hartman
2016-10-17  8:33   ` Peter Zijlstra
2016-10-17  9:01     ` Jiri Slaby
2016-10-17  9:09       ` Peter Zijlstra
2016-10-17 11:27         ` Vegard Nossum
2016-10-17 11:45           ` Peter Zijlstra
2016-10-18  8:08             ` Vegard Nossum
2016-10-18 21:18               ` Luis R. Rodriguez
2016-10-19  8:18                 ` Richard Biener
2016-10-19  9:13                   ` Peter Zijlstra
2016-10-19  9:33                     ` Richard Biener
2016-10-19 10:25                       ` Peter Zijlstra
2016-10-19 11:11                         ` Richard Biener
2016-10-19 11:31                           ` Peter Zijlstra
2016-11-02 12:11                         ` Markus Trippelsdorf
2016-11-02 12:14                           ` Richard Biener
2016-11-02 15:02                             ` Linus Torvalds
2016-10-19  7:16             ` Jiri Slaby
2016-10-16 15:16 ` [PATCH 02/12] firmware: declare {__start,__end}_builtin_fw as external array Vegard Nossum
2016-10-16 15:16 ` [PATCH 03/12] ftrace: declare __{start,stop}_mcount_loc " Vegard Nossum
2016-10-16 15:16 ` [PATCH 04/12] tracing: declare __{start,stop}_{annotated_,}branch_profile " Vegard Nossum
2016-10-16 15:16 ` [PATCH 05/12] kprobes: declare __{start,stop}_kprobe_blacklist " Vegard Nossum
2016-10-17  5:53   ` Masami Hiramatsu
2016-10-16 15:16 ` [PATCH 06/12] tracing: declare __{start,stop}_ftrace_events " Vegard Nossum
2016-10-16 15:16 ` [PATCH 07/12] tracing: declare __{start,stop}_ftrace_enum_maps " Vegard Nossum
2016-10-16 15:16 ` [PATCH 08/12] tracing: declare __trace_bprintk_fmt/__tracepoint_str as external arrays Vegard Nossum
2016-10-16 15:16 ` [PATCH 09/12] tracing: declare __{start,stop}_syscalls_metadata as external array Vegard Nossum
2016-10-16 15:16 ` Vegard Nossum [this message]
2016-10-16 15:16 ` [PATCH 11/12] jump_label: declare jump table " Vegard Nossum
2016-10-16 16:25   ` Peter Zijlstra
2016-10-16 16:50     ` Vegard Nossum
2016-10-16 17:44       ` Peter Zijlstra
2016-10-17 21:33       ` Steven Rostedt
2016-10-16 15:16 ` [PATCH 12/12] dynamic debug: declare " Vegard Nossum
2016-10-16 16:14 ` [PATCH 00/12] external array access helpers Greg Kroah-Hartman
2016-10-16 17:05   ` Vegard Nossum
2016-10-17  7:02     ` Greg Kroah-Hartman
2016-10-17  6:26   ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161016151616.31451-11-vegard.nossum@oracle.com \
    --to=vegard.nossum@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.