]> Pileus Git - ~andy/linux/commitdiff
add memory barrier to arch_local_irq_restore
authorMark Salter <msalter@redhat.com>
Tue, 9 Apr 2013 19:35:46 +0000 (15:35 -0400)
committerMark Salter <msalter@redhat.com>
Tue, 9 Apr 2013 19:35:46 +0000 (15:35 -0400)
arch_local_irq_save() and friends are required to act as compiler
memory barriers. This patch adds a "memory" clobber to the inline
asm code in arch_local_irq_restore() which is used as the building
block for other functions needing to set/clear the interrupt enable
in the CSR register.

Signed-off-by: Mark Salter <msalter@redhat.com>
arch/c6x/include/asm/irqflags.h

index cf78e09e18c3613fe027cd3ac458ed4a4a15c01b..2c71d5634ec299e181d53a4a2ca430563d385b05 100644 (file)
@@ -27,7 +27,7 @@ static inline unsigned long arch_local_save_flags(void)
 /* set interrupt enabled status */
 static inline void arch_local_irq_restore(unsigned long flags)
 {
-       asm volatile (" mvc .s2 %0,CSR\n" : : "b"(flags));
+       asm volatile (" mvc .s2 %0,CSR\n" : : "b"(flags) : "memory");
 }
 
 /* unconditionally enable interrupts */