[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161016151616.31451-12-vegard.nossum@oracle.com>
Date: Sun, 16 Oct 2016 17:16:15 +0200
From: Vegard Nossum <vegard.nossum@...cle.com>
To: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.cz>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Luis R . Rodriguez" <mcgrof@...nel.org>,
Vegard Nossum <vegard.nossum@...cle.com>,
Jason Baron <jbaron@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH 11/12] jump_label: declare jump table as external array
Cc: Jason Baron <jbaron@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
---
include/linux/jump_label.h | 4 ++--
kernel/jump_label.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index a0547c5..7ba9918 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -76,6 +76,7 @@
#ifndef __ASSEMBLY__
+#include <linux/extarray.h>
#include <linux/types.h>
#include <linux/compiler.h>
@@ -132,8 +133,7 @@ static __always_inline bool static_key_true(struct static_key *key)
return !arch_static_branch(key, true);
}
-extern struct jump_entry __start___jump_table[];
-extern struct jump_entry __stop___jump_table[];
+DECLARE_EXTARRAY(struct jump_entry, __jump_table);
extern void jump_label_init(void);
extern void jump_label_lock(void);
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index 93ad6c1..bf14906 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -274,8 +274,8 @@ static void __jump_label_update(struct static_key *key,
void __init jump_label_init(void)
{
- struct jump_entry *iter_start = __start___jump_table;
- struct jump_entry *iter_stop = __stop___jump_table;
+ struct jump_entry *iter_start = ext_start(__jump_table);
+ struct jump_entry *iter_stop = ext_end(__jump_table);
struct static_key *key = NULL;
struct jump_entry *iter;
@@ -539,8 +539,8 @@ early_initcall(jump_label_init_module);
*/
int jump_label_text_reserved(void *start, void *end)
{
- int ret = __jump_label_text_reserved(__start___jump_table,
- __stop___jump_table, start, end);
+ int ret = __jump_label_text_reserved(ext_start(__jump_table),
+ ext_end(__jump_table), start, end);
if (ret)
return ret;
@@ -553,7 +553,7 @@ int jump_label_text_reserved(void *start, void *end)
static void jump_label_update(struct static_key *key)
{
- struct jump_entry *stop = __stop___jump_table;
+ struct jump_entry *stop = ext_end(__jump_table);
struct jump_entry *entry = static_key_entries(key);
#ifdef CONFIG_MODULES
struct module *mod;
--
2.10.0.479.g221bd91
Powered by blists - more mailing lists