All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Anton Blanchard <anton@samba.org>
Cc: "benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"paulus@samba.org" <paulus@samba.org>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"mmarek@suse.cz" <mmarek@suse.cz>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"jbaron@akamai.com" <jbaron@akamai.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"liuj97@gmail.com" <liuj97@gmail.com>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"mgorman@suse.de" <mgorman@suse.de>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>,
	"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>,
	"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in assembly
Date: Wed, 7 Jan 2015 11:30:05 +0000	[thread overview]
Message-ID: <20150107113004.GJ7485@arm.com> (raw)
In-Reply-To: <1420626958-31254-1-git-send-email-anton@samba.org>

On Wed, Jan 07, 2015 at 10:35:56AM +0000, Anton Blanchard wrote:
> Wrap asm/jump_label.h for all archs with #ifndef __ASSEMBLY__.
> Since these are kernel only headers, we don't need #ifdef __KERNEL__
> so can simplify things a bit.
> 
> If an architecture wants to use jump labels in assembly, it
> will still need to define a macro to create the __jump_table
> entries (see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h
> for an example).
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
>  arch/arm/include/asm/jump_label.h   | 5 ++---
>  arch/arm64/include/asm/jump_label.h | 8 ++++----
>  arch/mips/include/asm/jump_label.h  | 7 +++----
>  arch/s390/include/asm/jump_label.h  | 3 +++
>  arch/sparc/include/asm/jump_label.h | 5 ++---
>  arch/x86/include/asm/jump_label.h   | 5 ++---
>  6 files changed, 16 insertions(+), 17 deletions(-)

[...]

> diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
> index 076a1c7..c0e5165 100644
> --- a/arch/arm64/include/asm/jump_label.h
> +++ b/arch/arm64/include/asm/jump_label.h
> @@ -18,11 +18,12 @@
>   */
>  #ifndef __ASM_JUMP_LABEL_H
>  #define __ASM_JUMP_LABEL_H
> +
> +#ifndef __ASSEMBLY__
> +
>  #include <linux/types.h>
>  #include <asm/insn.h>
>  
> -#ifdef __KERNEL__
> -
>  #define JUMP_LABEL_NOP_SIZE		AARCH64_INSN_SIZE
>  
>  static __always_inline bool arch_static_branch(struct static_key *key)
> @@ -39,8 +40,6 @@ l_yes:
>  	return true;
>  }
>  
> -#endif /* __KERNEL__ */
> -
>  typedef u64 jump_label_t;
>  
>  struct jump_entry {
> @@ -49,4 +48,5 @@ struct jump_entry {
>  	jump_label_t key;
>  };
>  
> +#endif  /* __ASSEMBLY__ */
>  #endif	/* __ASM_JUMP_LABEL_H */

The arm64 bit looks fine to me:

  Acked-by: Will Deacon <will.deacon@arm.com>

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Anton Blanchard <anton@samba.org>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
	"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
	"paulus@samba.org" <paulus@samba.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"mgorman@suse.de" <mgorman@suse.de>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"liuj97@gmail.com" <liuj97@gmail.com>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"jbaron@akamai.com" <jbaron@akamai.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mmarek@suse.cz" <mmarek@suse.cz>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>,
	"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in assembly
Date: Wed, 7 Jan 2015 11:30:05 +0000	[thread overview]
Message-ID: <20150107113004.GJ7485@arm.com> (raw)
In-Reply-To: <1420626958-31254-1-git-send-email-anton@samba.org>

On Wed, Jan 07, 2015 at 10:35:56AM +0000, Anton Blanchard wrote:
> Wrap asm/jump_label.h for all archs with #ifndef __ASSEMBLY__.
> Since these are kernel only headers, we don't need #ifdef __KERNEL__
> so can simplify things a bit.
> 
> If an architecture wants to use jump labels in assembly, it
> will still need to define a macro to create the __jump_table
> entries (see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h
> for an example).
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
>  arch/arm/include/asm/jump_label.h   | 5 ++---
>  arch/arm64/include/asm/jump_label.h | 8 ++++----
>  arch/mips/include/asm/jump_label.h  | 7 +++----
>  arch/s390/include/asm/jump_label.h  | 3 +++
>  arch/sparc/include/asm/jump_label.h | 5 ++---
>  arch/x86/include/asm/jump_label.h   | 5 ++---
>  6 files changed, 16 insertions(+), 17 deletions(-)

[...]

> diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
> index 076a1c7..c0e5165 100644
> --- a/arch/arm64/include/asm/jump_label.h
> +++ b/arch/arm64/include/asm/jump_label.h
> @@ -18,11 +18,12 @@
>   */
>  #ifndef __ASM_JUMP_LABEL_H
>  #define __ASM_JUMP_LABEL_H
> +
> +#ifndef __ASSEMBLY__
> +
>  #include <linux/types.h>
>  #include <asm/insn.h>
>  
> -#ifdef __KERNEL__
> -
>  #define JUMP_LABEL_NOP_SIZE		AARCH64_INSN_SIZE
>  
>  static __always_inline bool arch_static_branch(struct static_key *key)
> @@ -39,8 +40,6 @@ l_yes:
>  	return true;
>  }
>  
> -#endif /* __KERNEL__ */
> -
>  typedef u64 jump_label_t;
>  
>  struct jump_entry {
> @@ -49,4 +48,5 @@ struct jump_entry {
>  	jump_label_t key;
>  };
>  
> +#endif  /* __ASSEMBLY__ */
>  #endif	/* __ASM_JUMP_LABEL_H */

The arm64 bit looks fine to me:

  Acked-by: Will Deacon <will.deacon@arm.com>

Will

  parent reply	other threads:[~2015-01-07 11:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 10:35 [PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in assembly Anton Blanchard
2015-01-07 10:35 ` Anton Blanchard
2015-01-07 10:35 ` [PATCH 2/3] jump_label: Allow jump labels to be used " Anton Blanchard
2015-01-07 10:35   ` Anton Blanchard
2015-01-07 10:35 ` [PATCH 3/3] powerpc: Include linux/jump_label.h to get HAVE_JUMP_LABEL define Anton Blanchard
2015-01-07 10:35   ` Anton Blanchard
2015-01-07 15:09   ` Jason Baron
2015-01-07 15:09     ` Jason Baron
2015-01-21  3:55     ` Anton Blanchard
2015-01-21  3:55       ` Anton Blanchard
2015-01-07 11:30 ` Will Deacon [this message]
2015-01-07 11:30   ` [PATCH 1/3] jump_label: Allow asm/jump_label.h to be included in assembly Will Deacon
2015-04-09  3:50 Anton Blanchard
2015-04-09  3:51 Anton Blanchard
2015-04-09  3:51 ` Anton Blanchard
2015-04-09  7:08 ` Peter Zijlstra
2015-04-09  7:08   ` Peter Zijlstra
2015-04-09 14:00 ` Steven Rostedt
2015-04-09 14:00   ` Steven Rostedt

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=20150107113004.GJ7485@arm.com \
    --to=will.deacon@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@akamai.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=liuj97@gmail.com \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.cz \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=rostedt@goodmis.org \
    --cc=schwidefsky@de.ibm.com \
    --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 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.