linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix wrong dmb
@ 2010-01-12 17:02 Russell King - ARM Linux
  2010-01-12 18:09 ` Catalin Marinas
  2010-01-12 18:43 ` Nicolas Pitre
  0 siblings, 2 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2010-01-12 17:02 UTC (permalink / raw)
  To: linux-arm-kernel

The __kuser_cmpxchg code uses an ARMv6 dmb instruction, rather than
one based upon the architecture being built for.  Switch to using
the macro provided for this purpose, which also eliminates the
need for an ifdef.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index d2903e3..6c5cf36 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -957,9 +957,7 @@ kuser_cmpxchg_fixup:
 
 #else
 
-#ifdef CONFIG_SMP
-	mcr	p15, 0, r0, c7, c10, 5	@ dmb
-#endif
+	smp_dmb
 1:	ldrex	r3, [r2]
 	subs	r3, r3, r0
 	strexeq	r3, r1, [r2]

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

* [PATCH] Fix wrong dmb
  2010-01-12 17:02 [PATCH] Fix wrong dmb Russell King - ARM Linux
@ 2010-01-12 18:09 ` Catalin Marinas
  2010-01-12 18:43 ` Nicolas Pitre
  1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2010-01-12 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 2010-01-12 at 17:02 +0000, Russell King - ARM Linux wrote:
> The __kuser_cmpxchg code uses an ARMv6 dmb instruction, rather than
> one based upon the architecture being built for.  Switch to using
> the macro provided for this purpose, which also eliminates the
> need for an ifdef.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> diff --git a/arch/arm/kernel/entry-armv.S
> b/arch/arm/kernel/entry-armv.S
> index d2903e3..6c5cf36 100644
> --- a/arch/arm/kernel/entry-armv.S
> +++ b/arch/arm/kernel/entry-armv.S
> @@ -957,9 +957,7 @@ kuser_cmpxchg_fixup:
> 
>  #else
> 
> -#ifdef CONFIG_SMP
> -       mcr     p15, 0, r0, c7, c10, 5  @ dmb
> -#endif
> +       smp_dmb
>  1:     ldrex   r3, [r2]
>         subs    r3, r3, r0
>         strexeq r3, r1, [r2]

Looks fine as well.

-- 
Catalin

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

* [PATCH] Fix wrong dmb
  2010-01-12 17:02 [PATCH] Fix wrong dmb Russell King - ARM Linux
  2010-01-12 18:09 ` Catalin Marinas
@ 2010-01-12 18:43 ` Nicolas Pitre
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Pitre @ 2010-01-12 18:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 12 Jan 2010, Russell King - ARM Linux wrote:

> The __kuser_cmpxchg code uses an ARMv6 dmb instruction, rather than
> one based upon the architecture being built for.  Switch to using
> the macro provided for this purpose, which also eliminates the
> need for an ifdef.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nico@fluxnic.net>


> 
> diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
> index d2903e3..6c5cf36 100644
> --- a/arch/arm/kernel/entry-armv.S
> +++ b/arch/arm/kernel/entry-armv.S
> @@ -957,9 +957,7 @@ kuser_cmpxchg_fixup:
>  
>  #else
>  
> -#ifdef CONFIG_SMP
> -	mcr	p15, 0, r0, c7, c10, 5	@ dmb
> -#endif
> +	smp_dmb
>  1:	ldrex	r3, [r2]
>  	subs	r3, r3, r0
>  	strexeq	r3, r1, [r2]
> 

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

end of thread, other threads:[~2010-01-12 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 17:02 [PATCH] Fix wrong dmb Russell King - ARM Linux
2010-01-12 18:09 ` Catalin Marinas
2010-01-12 18:43 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).