public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm64: barrier: Remove spec_bar() macro
@ 2021-03-25 14:13 Linus Walleij
  2021-03-25 14:34 ` Mark Rutland
  2021-03-26 11:06 ` Catalin Marinas
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2021-03-25 14:13 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, Linus Walleij, Mark Rutland

The spec_bar() macro was introduced in
commit bd4fb6d270bc ("arm64: Add support for SB barrier and patch in over DSB; ISB sequences")
as a way for C to insert a speculation barrier and was then
used in one single place: set_fs().

Later on
commit 3d2403fd10a1 ("arm64: uaccess: remove set_fs()")
deleted set_fs() altogether and as noted in the commit
on the new path the regular sb() assembly macro will
be used.

Delete the remnant.

Cc: Mark Rutland <mark.rutland@arm.com>
Fixes: 3d2403fd10a1 ("arm64: uaccess: remove set_fs()")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm64/include/asm/barrier.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h
index c3009b0e5239..bab29932d21b 100644
--- a/arch/arm64/include/asm/barrier.h
+++ b/arch/arm64/include/asm/barrier.h
@@ -25,10 +25,6 @@
 #define psb_csync()	asm volatile("hint #17" : : : "memory")
 #define csdb()		asm volatile("hint #20" : : : "memory")
 
-#define spec_bar()	asm volatile(ALTERNATIVE("dsb nsh\nisb\n",		\
-						 SB_BARRIER_INSN"nop\n",	\
-						 ARM64_HAS_SB))
-
 #ifdef CONFIG_ARM64_PSEUDO_NMI
 #define pmr_sync()						\
 	do {							\
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: barrier: Remove spec_bar() macro
  2021-03-25 14:13 [PATCH] arm64: barrier: Remove spec_bar() macro Linus Walleij
@ 2021-03-25 14:34 ` Mark Rutland
  2021-03-26 11:06 ` Catalin Marinas
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2021-03-25 14:34 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel

On Thu, Mar 25, 2021 at 03:13:04PM +0100, Linus Walleij wrote:
> The spec_bar() macro was introduced in
> commit bd4fb6d270bc ("arm64: Add support for SB barrier and patch in over DSB; ISB sequences")
> as a way for C to insert a speculation barrier and was then
> used in one single place: set_fs().
> 
> Later on
> commit 3d2403fd10a1 ("arm64: uaccess: remove set_fs()")
> deleted set_fs() altogether and as noted in the commit
> on the new path the regular sb() assembly macro will
> be used.
> 
> Delete the remnant.
> 
> Cc: Mark Rutland <mark.rutland@arm.com>
> Fixes: 3d2403fd10a1 ("arm64: uaccess: remove set_fs()")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

I think this is a cleanup rather than a fix, so we don't need the fixes
tag. I don't have a problem with this going, so with the fixes tag
removed:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/include/asm/barrier.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h
> index c3009b0e5239..bab29932d21b 100644
> --- a/arch/arm64/include/asm/barrier.h
> +++ b/arch/arm64/include/asm/barrier.h
> @@ -25,10 +25,6 @@
>  #define psb_csync()	asm volatile("hint #17" : : : "memory")
>  #define csdb()		asm volatile("hint #20" : : : "memory")
>  
> -#define spec_bar()	asm volatile(ALTERNATIVE("dsb nsh\nisb\n",		\
> -						 SB_BARRIER_INSN"nop\n",	\
> -						 ARM64_HAS_SB))
> -
>  #ifdef CONFIG_ARM64_PSEUDO_NMI
>  #define pmr_sync()						\
>  	do {							\
> -- 
> 2.29.2
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: barrier: Remove spec_bar() macro
  2021-03-25 14:13 [PATCH] arm64: barrier: Remove spec_bar() macro Linus Walleij
  2021-03-25 14:34 ` Mark Rutland
@ 2021-03-26 11:06 ` Catalin Marinas
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2021-03-26 11:06 UTC (permalink / raw)
  To: Will Deacon, Linus Walleij; +Cc: Mark Rutland, linux-arm-kernel

On Thu, 25 Mar 2021 15:13:04 +0100, Linus Walleij wrote:
> The spec_bar() macro was introduced in
> commit bd4fb6d270bc ("arm64: Add support for SB barrier and patch in over DSB; ISB sequences")
> as a way for C to insert a speculation barrier and was then
> used in one single place: set_fs().
> 
> Later on
> commit 3d2403fd10a1 ("arm64: uaccess: remove set_fs()")
> deleted set_fs() altogether and as noted in the commit
> on the new path the regular sb() assembly macro will
> be used.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: barrier: Remove spec_bar() macro
      https://git.kernel.org/arm64/c/4f30ba1cce36

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-03-26 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-25 14:13 [PATCH] arm64: barrier: Remove spec_bar() macro Linus Walleij
2021-03-25 14:34 ` Mark Rutland
2021-03-26 11:06 ` Catalin Marinas

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