Skip to content

Commit

Permalink
add memory barrier to arch_local_irq_restore
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Salter committed Apr 9, 2013
1 parent 31880c3 commit f934af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/c6x/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f934af0

Please sign in to comment.