[PATCH] Fix wrong dmb

Catalin Marinas catalin.marinas at arm.com
Tue Jan 12 13:09:36 EST 2010


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 at 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




More information about the linux-arm-kernel mailing list