Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1501477
| From | Vegard Nossum <vegard.nossum@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 11/12] jump_label: declare jump table as external array |
| Date | 2016-10-16 17:20 +0200 |
| Message-ID | <ssVod-7uv-19@gated-at.bofh.it> (permalink) |
| References | <ssVod-7uv-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cc: Jason Baron <jbaron@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 11/12] jump_label: declare jump table as external array Vegard Nossum <vegard.nossum@oracle.com> - 2016-10-16 17:20 +0200
Re: [PATCH 11/12] jump_label: declare jump table as external array Peter Zijlstra <peterz@infradead.org> - 2016-10-16 18:30 +0200
Re: [PATCH 11/12] jump_label: declare jump table as external array Vegard Nossum <vegard.nossum@oracle.com> - 2016-10-16 19:00 +0200
Re: [PATCH 11/12] jump_label: declare jump table as external array Peter Zijlstra <peterz@infradead.org> - 2016-10-16 19:50 +0200
Re: [PATCH 11/12] jump_label: declare jump table as external array Steven Rostedt <rostedt@goodmis.org> - 2016-10-17 23:40 +0200
csiph-web