Skip to contentSkip to conversation

Fix wrong dmb

PATCH New Russell King - ARM Linux 3 participants 3 messages Jan 12, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix wrong dmb

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.

arch/arm/kernel/entry-armv.S +1 -3
index d2903e3..6c5cf36 100644
@@ -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]
#1 lore raw

PATCH 1/1 Fix wrong dmb

Quoted 13 lines · Russell King - ARM Linux

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.

arch/arm/kernel/entry-armv.S +0 -0
index d2903e3..6c5cf36 100644

arch/arm/kernel/entry-armv.S kuser_cmpxchg_fixup: · line 963

Quoted 10 lines
arch/arm/kernel/entry-armv.S +1 -3
@@ -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.

Signature · 1 line
Catalin
#2 lore raw

PATCH 1/1 Fix wrong dmb

In reply to Russell King - ARM Linux
Quoted 6 lines · Russell King - ARM Linux

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.

Quoted 17 lines
arch/arm/kernel/entry-armv.S +1 -3
index d2903e3..6c5cf36 100644
@@ -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]