public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jason Baron <jbaron@redhat.com>,
	peterz@infradead.org, hpa@zytor.com,
	mathieu.desnoyers@polymtl.ca, mingo@elte.hu, tglx@linutronix.de,
	andi@firstfloor.org, roland@redhat.com, rth@redhat.com,
	masami.hiramatsu.pt@hitachi.com, fweisbec@gmail.com,
	avi@redhat.com, davem@davemloft.net, sam@ravnborg.org,
	ddaney@caviumnetworks.com, michael@ellerman.id.au,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] jump label: introduce static_branch() interface
Date: Fri, 11 Mar 2011 03:05:40 +0100	[thread overview]
Message-ID: <20110311020540.GA26622@linux-mips.org> (raw)
In-Reply-To: <1299790616.15854.417.camel@gandalf.stny.rr.com>

On Thu, Mar 10, 2011 at 03:56:56PM -0500, Steven Rostedt wrote:

> On Wed, 2011-03-09 at 15:47 -0500, Jason Baron wrote:
> 
> >  arch/mips/include/asm/jump_label.h  |   22 +-
> >  arch/mips/kernel/jump_label.c       |    2 +-
> >  arch/sparc/include/asm/jump_label.h |   25 +-
> >  arch/x86/include/asm/alternative.h  |    3 +-
> >  arch/x86/include/asm/jump_label.h   |   26 +-
> >  arch/x86/kernel/alternative.c       |    2 +-
> >  arch/x86/kernel/jump_label.c        |    2 +-
> >  arch/x86/kernel/module.c            |    1 +
> >  include/asm-generic/vmlinux.lds.h   |   14 +-
> >  include/linux/dynamic_debug.h       |    2 -
> >  include/linux/jump_label.h          |   86 ++++---
> >  include/linux/jump_label_ref.h      |   44 ---
> >  include/linux/perf_event.h          |   26 +-
> >  include/linux/tracepoint.h          |   22 +-
> >  kernel/jump_label.c                 |  537 ++++++++++++++---------------------
> >  kernel/perf_event.c                 |    4 +-
> >  kernel/tracepoint.c                 |   23 +-
> >  17 files changed, 352 insertions(+), 489 deletions(-)
> >  delete mode 100644 include/linux/jump_label_ref.h
> > 
> > diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h
> > index 7622ccf..1881b31 100644
> > --- a/arch/mips/include/asm/jump_label.h
> > +++ b/arch/mips/include/asm/jump_label.h
> > @@ -20,16 +20,18 @@
> >  #define WORD_INSN ".word"
> >  #endif
> >  
> > -#define JUMP_LABEL(key, label)						\
> > -	do {								\
> > -		asm goto("1:\tnop\n\t"					\
> > -			"nop\n\t"					\
> > -			".pushsection __jump_table,  \"a\"\n\t"		\
> > -			WORD_INSN " 1b, %l[" #label "], %0\n\t"		\
> > -			".popsection\n\t"				\
> > -			: :  "i" (key) :  : label);			\
> > -	} while (0)
> > -
> > +static __always_inline bool arch_static_branch(struct jump_label_key *key)
> > +{
> > +	asm goto("1:\tnop\n\t"
> > +		"nop\n\t"
> > +		".pushsection __jump_table,  \"aw\"\n\t"
> > +		WORD_INSN " 1b, %l[l_yes], %0\n\t"
> > +		".popsection\n\t"
> > +		: :  "i" (key) : : l_yes);
> > +	return false;
> > +l_yes:
> > +	return true;
> > +}
> >  
> >  #endif /* __KERNEL__ */
> >  
> > diff --git a/arch/mips/kernel/jump_label.c b/arch/mips/kernel/jump_label.c
> > index 6001610..09ac7ca 100644
> > --- a/arch/mips/kernel/jump_label.c
> > +++ b/arch/mips/kernel/jump_label.c
> > @@ -6,11 +6,11 @@
> >   * Copyright (c) 2010 Cavium Networks, Inc.
> >   */
> >  
> > -#include <linux/jump_label.h>
> >  #include <linux/kernel.h>
> >  #include <linux/memory.h>
> >  #include <linux/mutex.h>
> >  #include <linux/types.h>
> > +#include <linux/jump_label.h>
> >  #include <linux/cpu.h>
> >  
> >  #include <asm/cacheflush.h>
> 
> Hi Ralf,
> 
> Can I get your Acked-by on this patch.

You could have gotten it quicker if I had been on cc ...

I'm happy with the change to arch/mips/include/asm/jump_label.h and
assuming that the change to arch/mips/kernel/jump_label.c will be dropped

Acked-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

  reply	other threads:[~2011-03-11  2:05 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 20:47 [PATCH 0/2] jump label: update for .39 Jason Baron
2011-03-09 20:47 ` [PATCH 1/2] jump label: introduce static_branch() interface Jason Baron
2011-03-10 20:54   ` Steven Rostedt
2011-03-10 20:56   ` Steven Rostedt
2011-03-11  2:05     ` Ralf Baechle [this message]
2011-03-11  2:15       ` Steven Rostedt
2011-03-10 21:01   ` Steven Rostedt
2011-03-10 21:18     ` Jason Baron
2011-03-11  2:02       ` Ralf Baechle
2011-03-09 20:47 ` [PATCH 2/2] dynamic debug: add jump label support Jason Baron
2011-03-10  3:36 ` [PATCH 0/2] jump label: update for .39 Steven Rostedt
2011-03-10 14:11   ` Mathieu Desnoyers
2011-03-10 14:46   ` Jason Baron
     [not found]   ` <BLU0-SMTP690BB959832A97E002293396C80@phx.gbl>
2011-03-10 15:38     ` Steven Rostedt
2011-03-10 17:27       ` David Daney
2011-03-10 18:04         ` Steven Rostedt
2011-03-10 18:20           ` Jason Baron
2011-03-10 18:35             ` Steven Rostedt
2011-03-10 18:47               ` David Daney
2011-03-10 18:53                 ` Steven Rostedt
2011-03-10 18:57                   ` David Daney
2011-03-10 19:25                     ` Steven Rostedt
2011-03-10 19:45                       ` Steven Rostedt
2011-03-10 19:53                         ` Jason Baron
2011-03-10 20:01                           ` Steven Rostedt
2011-03-10 21:22                         ` Mathieu Desnoyers
     [not found]                         ` <BLU0-SMTP311155BEBE5F141636A6E596C80@phx.gbl>
2011-03-10 21:42                           ` Steven Rostedt
2011-03-10 22:11                             ` David Daney
2011-03-10 22:24                               ` Steven Rostedt
2011-03-10 22:48                             ` Mathieu Desnoyers
     [not found]                             ` <BLU0-SMTP101D168109508CC1B82F0E496C80@phx.gbl>
2011-03-10 23:16                               ` Steven Rostedt
2011-03-10 23:25                                 ` David Daney
2011-03-10 23:32                                   ` Thomas Gleixner
2011-03-10 23:43                                     ` Steven Rostedt
2011-03-10 23:51                                       ` Thomas Gleixner
     [not found]                         ` <BLU0-SMTP39EE03AE86CF0F0E5C570596C80@phx.gbl>
2011-03-11  0:38                           ` Ralf Baechle
2011-03-11  1:19                             ` Michael Ellerman
2011-03-11  2:39                             ` Mathieu Desnoyers
2011-03-10 21:39                   ` Mathieu Desnoyers
2011-03-10 21:11         ` Mathieu Desnoyers
2011-03-10 21:14       ` Mathieu Desnoyers
     [not found]       ` <BLU0-SMTP2489AC44910467F37596A496C80@phx.gbl>
2011-03-10 21:34         ` Steven Rostedt
2011-03-10 22:02           ` Mathieu Desnoyers
2011-03-10 16:41 ` Jan Glauber

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=20110311020540.GA26622@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ddaney@caviumnetworks.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=michael@ellerman.id.au \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=rth@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox