mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations
@ 2020-04-16 18:24 Mark Brown
  2020-04-17 10:08 ` Jiri Slaby
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Brown @ 2020-04-16 18:24 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H . Peter Anvin
  Cc: x86, Catalin Marinas, Will Deacon, Jiri Slaby, linux-kernel, Mark Brown

As x86 was converted to use the modern SYM_ annotations for assembly ifdefs
were added to remove the generic definitions of the old style annotations
on x86. Rather than collect a list of architectures in the ifdefs as more
architectures are converted over provide a Kconfig symbol for this and
update x86 to use it.

Signed-off-by: Mark Brown <broonie@kernel.org>
---

arm64 will all being well be able to use this shortly.

 arch/x86/Kconfig        | 1 +
 include/linux/linkage.h | 8 ++++----
 lib/Kconfig             | 3 +++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5706d0c8377f..1c6f88cefc88 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -92,6 +92,7 @@ config X86
 	select ARCH_USE_BUILTIN_BSWAP
 	select ARCH_USE_QUEUED_RWLOCKS
 	select ARCH_USE_QUEUED_SPINLOCKS
+	select ARCH_USE_SYM_ANNOTATIONS
 	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
 	select ARCH_WANT_DEFAULT_BPF_JIT	if X86_64
 	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 9280209d1f62..d796ec20d114 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -105,7 +105,7 @@
 
 /* === DEPRECATED annotations === */
 
-#ifndef CONFIG_X86
+#ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
 #ifndef GLOBAL
 /* deprecated, use SYM_DATA*, SYM_ENTRY, or similar */
 #define GLOBAL(name) \
@@ -118,10 +118,10 @@
 #define ENTRY(name) \
 	SYM_FUNC_START(name)
 #endif
-#endif /* CONFIG_X86 */
+#endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
 #endif /* LINKER_SCRIPT */
 
-#ifndef CONFIG_X86
+#ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
 #ifndef WEAK
 /* deprecated, use SYM_FUNC_START_WEAK* */
 #define WEAK(name)	   \
@@ -143,7 +143,7 @@
 #define ENDPROC(name) \
 	SYM_FUNC_END(name)
 #endif
-#endif /* CONFIG_X86 */
+#endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
 
 /* === generic annotations === */
 
diff --git a/lib/Kconfig b/lib/Kconfig
index 5d53f9609c25..e831e1f01767 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -80,6 +80,9 @@ config ARCH_USE_CMPXCHG_LOCKREF
 config ARCH_HAS_FAST_MULTIPLIER
 	bool
 
+config ARCH_USE_SYM_ANNOTATIONS
+	bool
+
 config INDIRECT_PIO
 	bool "Access I/O in non-MMIO mode"
 	depends on ARM64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations
  2020-04-16 18:24 [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations Mark Brown
@ 2020-04-17 10:08 ` Jiri Slaby
  2020-04-18 15:49 ` [tip: x86/asm] " tip-bot2 for Mark Brown
  2020-04-30 16:42 ` [PATCH] " Will Deacon
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2020-04-17 10:08 UTC (permalink / raw)
  To: Mark Brown, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin
  Cc: x86, Catalin Marinas, Will Deacon, linux-kernel

On 16. 04. 20, 20:24, Mark Brown wrote:
> As x86 was converted to use the modern SYM_ annotations for assembly ifdefs
> were added to remove the generic definitions of the old style annotations
> on x86. Rather than collect a list of architectures in the ifdefs as more
> architectures are converted over provide a Kconfig symbol for this and
> update x86 to use it.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Acked-by: Jiri Slaby <jslaby@suse.cz>

> ---
> 
> arm64 will all being well be able to use this shortly.
> 
>  arch/x86/Kconfig        | 1 +
>  include/linux/linkage.h | 8 ++++----
>  lib/Kconfig             | 3 +++
>  3 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5706d0c8377f..1c6f88cefc88 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -92,6 +92,7 @@ config X86
>  	select ARCH_USE_BUILTIN_BSWAP
>  	select ARCH_USE_QUEUED_RWLOCKS
>  	select ARCH_USE_QUEUED_SPINLOCKS
> +	select ARCH_USE_SYM_ANNOTATIONS
>  	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
>  	select ARCH_WANT_DEFAULT_BPF_JIT	if X86_64
>  	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
...
thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: x86/asm] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations
  2020-04-16 18:24 [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations Mark Brown
  2020-04-17 10:08 ` Jiri Slaby
@ 2020-04-18 15:49 ` tip-bot2 for Mark Brown
  2020-04-30 16:42 ` [PATCH] " Will Deacon
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Mark Brown @ 2020-04-18 15:49 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Mark Brown, Borislav Petkov, Jiri Slaby, x86, LKML

The following commit has been merged into the x86/asm branch of tip:

Commit-ID:     2ce0d7f9766f0e49bb54f149c77bae89464932fb
Gitweb:        https://git.kernel.org/tip/2ce0d7f9766f0e49bb54f149c77bae89464932fb
Author:        Mark Brown <broonie@kernel.org>
AuthorDate:    Thu, 16 Apr 2020 19:24:02 +01:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Sat, 18 Apr 2020 17:43:09 +02:00

x86/asm: Provide a Kconfig symbol for disabling old assembly annotations

As x86 was converted to use the modern SYM_ annotations for assembly,
ifdefs were added to remove the generic definitions of the old style
annotations on x86. Rather than collect a list of architectures in the
ifdefs as more architectures are converted over, provide a Kconfig
symbol for this and update x86 to use it.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lkml.kernel.org/r/20200416182402.6206-1-broonie@kernel.org
---
 arch/x86/Kconfig        | 1 +
 include/linux/linkage.h | 8 ++++----
 lib/Kconfig             | 3 +++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d6104e..e3d22ed 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -91,6 +91,7 @@ config X86
 	select ARCH_USE_BUILTIN_BSWAP
 	select ARCH_USE_QUEUED_RWLOCKS
 	select ARCH_USE_QUEUED_SPINLOCKS
+	select ARCH_USE_SYM_ANNOTATIONS
 	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
 	select ARCH_WANT_DEFAULT_BPF_JIT	if X86_64
 	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 9280209..d796ec2 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -105,7 +105,7 @@
 
 /* === DEPRECATED annotations === */
 
-#ifndef CONFIG_X86
+#ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
 #ifndef GLOBAL
 /* deprecated, use SYM_DATA*, SYM_ENTRY, or similar */
 #define GLOBAL(name) \
@@ -118,10 +118,10 @@
 #define ENTRY(name) \
 	SYM_FUNC_START(name)
 #endif
-#endif /* CONFIG_X86 */
+#endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
 #endif /* LINKER_SCRIPT */
 
-#ifndef CONFIG_X86
+#ifndef CONFIG_ARCH_USE_SYM_ANNOTATIONS
 #ifndef WEAK
 /* deprecated, use SYM_FUNC_START_WEAK* */
 #define WEAK(name)	   \
@@ -143,7 +143,7 @@
 #define ENDPROC(name) \
 	SYM_FUNC_END(name)
 #endif
-#endif /* CONFIG_X86 */
+#endif /* CONFIG_ARCH_USE_SYM_ANNOTATIONS */
 
 /* === generic annotations === */
 
diff --git a/lib/Kconfig b/lib/Kconfig
index 5d53f96..e831e1f 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -80,6 +80,9 @@ config ARCH_USE_CMPXCHG_LOCKREF
 config ARCH_HAS_FAST_MULTIPLIER
 	bool
 
+config ARCH_USE_SYM_ANNOTATIONS
+	bool
+
 config INDIRECT_PIO
 	bool "Access I/O in non-MMIO mode"
 	depends on ARM64

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations
  2020-04-16 18:24 [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations Mark Brown
  2020-04-17 10:08 ` Jiri Slaby
  2020-04-18 15:49 ` [tip: x86/asm] " tip-bot2 for Mark Brown
@ 2020-04-30 16:42 ` Will Deacon
  2 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2020-04-30 16:42 UTC (permalink / raw)
  To: Mark Brown
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H . Peter Anvin,
	x86, Catalin Marinas, Jiri Slaby, linux-kernel

On Thu, Apr 16, 2020 at 07:24:02PM +0100, Mark Brown wrote:
> As x86 was converted to use the modern SYM_ annotations for assembly ifdefs
> were added to remove the generic definitions of the old style annotations
> on x86. Rather than collect a list of architectures in the ifdefs as more
> architectures are converted over provide a Kconfig symbol for this and
> update x86 to use it.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> 
> arm64 will all being well be able to use this shortly.

Just for the record (already discussed with Boris off-list), I'm going to
queue this in the arm64 tree by pulling the x86/asm branch from -tip.

Thanks,

Will

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-30 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 18:24 [PATCH] x86/asm: Provide a Kconfig symbol for disabling old assembly annotations Mark Brown
2020-04-17 10:08 ` Jiri Slaby
2020-04-18 15:49 ` [tip: x86/asm] " tip-bot2 for Mark Brown
2020-04-30 16:42 ` [PATCH] " Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome