Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578649 > unrolled thread

[PATCH] jump_label: don't export section tags

Started by"Michael S. Tsirkin" <mst@redhat.com>
First post2017-02-10 19:00 +0100
Last post2017-02-10 20:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] jump_label: don't export section tags "Michael S. Tsirkin" <mst@redhat.com> - 2017-02-10 19:00 +0100
    Re: [PATCH] jump_label: don't export section tags Jason Baron <jbaron@akamai.com> - 2017-02-10 20:10 +0100
    Re: [PATCH] jump_label: don't export section tags Steven Rostedt <rostedt@goodmis.org> - 2017-02-10 20:10 +0100

#1578649 — [PATCH] jump_label: don't export section tags

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-02-10 19:00 +0100
Subject[PATCH] jump_label: don't export section tags
Message-ID<t9nEe-6Co-27@gated-at.bofh.it>
These are supplied by the linker and only used by jump_label.c.
This trivial patch moves them out of jump_label.h.

Cc: Jason Baron <jbaron@akamai.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/linux/jump_label.h | 3 ---
 kernel/jump_label.c        | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 48ed83f..21701da 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -132,9 +132,6 @@ static __always_inline bool static_key_true(struct static_key *key)
 	return !arch_static_branch(key, true);
 }
 
-extern const struct jump_entry __start___jump_table[];
-extern const struct jump_entry __stop___jump_table[];
-
 extern void jump_label_init(void);
 extern void jump_label_lock(void);
 extern void jump_label_unlock(void);
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index a9b8cf5..6eaa84c 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -18,6 +18,10 @@
 
 #ifdef HAVE_JUMP_LABEL
 
+/* Supplied by a linker script */
+extern struct jump_entry __start___jump_table[];
+extern struct jump_entry __stop___jump_table[];
+
 /* mutex to protect coming/going of the the jump_label table */
 static DEFINE_MUTEX(jump_label_mutex);
 
-- 
MST

[toc] | [next] | [standalone]


#1578722

FromJason Baron <jbaron@akamai.com>
Date2017-02-10 20:10 +0100
Message-ID<t9oJX-7y4-7@gated-at.bofh.it>
In reply to#1578649

On 02/10/2017 12:29 PM, Michael S. Tsirkin wrote:
> These are supplied by the linker and only used by jump_label.c.
> This trivial patch moves them out of jump_label.h.
>
> Cc: Jason Baron <jbaron@akamai.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  include/linux/jump_label.h | 3 ---
>  kernel/jump_label.c        | 4 ++++
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> index 48ed83f..21701da 100644
> --- a/include/linux/jump_label.h
> +++ b/include/linux/jump_label.h
> @@ -132,9 +132,6 @@ static __always_inline bool static_key_true(struct static_key *key)
>  	return !arch_static_branch(key, true);
>  }
>
> -extern const struct jump_entry __start___jump_table[];
> -extern const struct jump_entry __stop___jump_table[];
> -
>  extern void jump_label_init(void);
>  extern void jump_label_lock(void);
>  extern void jump_label_unlock(void);

hmmm - looks this was on top of your previous patch?
Otherwise, looks good to me.

Thanks,

-Jason


> diff --git a/kernel/jump_label.c b/kernel/jump_label.c
> index a9b8cf5..6eaa84c 100644
> --- a/kernel/jump_label.c
> +++ b/kernel/jump_label.c
> @@ -18,6 +18,10 @@
>
>  #ifdef HAVE_JUMP_LABEL
>
> +/* Supplied by a linker script */
> +extern struct jump_entry __start___jump_table[];
> +extern struct jump_entry __stop___jump_table[];
> +
>  /* mutex to protect coming/going of the the jump_label table */
>  static DEFINE_MUTEX(jump_label_mutex);
>
>

[toc] | [prev] | [next] | [standalone]


#1578727

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-02-10 20:10 +0100
Message-ID<t9oJY-7y4-19@gated-at.bofh.it>
In reply to#1578649
On Fri, 10 Feb 2017 19:29:44 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> These are supplied by the linker and only used by jump_label.c.
> This trivial patch moves them out of jump_label.h.
> 
> Cc: Jason Baron <jbaron@akamai.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  include/linux/jump_label.h | 3 ---
>  kernel/jump_label.c        | 4 ++++
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> index 48ed83f..21701da 100644
> --- a/include/linux/jump_label.h
> +++ b/include/linux/jump_label.h
> @@ -132,9 +132,6 @@ static __always_inline bool static_key_true(struct static_key *key)
>  	return !arch_static_branch(key, true);
>  }
>  
> -extern const struct jump_entry __start___jump_table[];
> -extern const struct jump_entry __stop___jump_table[];
> -
>  extern void jump_label_init(void);
>  extern void jump_label_lock(void);
>  extern void jump_label_unlock(void);
> diff --git a/kernel/jump_label.c b/kernel/jump_label.c
> index a9b8cf5..6eaa84c 100644
> --- a/kernel/jump_label.c
> +++ b/kernel/jump_label.c
> @@ -18,6 +18,10 @@
>  
>  #ifdef HAVE_JUMP_LABEL
>  
> +/* Supplied by a linker script */

This is common practice and obvious to anyone that does a git grep. I
don't really think the comment is necessary.

But the change itself is fine.

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> +extern struct jump_entry __start___jump_table[];
> +extern struct jump_entry __stop___jump_table[];
> +
>  /* mutex to protect coming/going of the the jump_label table */
>  static DEFINE_MUTEX(jump_label_mutex);
>  

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web