Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: Add alternative patching to synchronize_caches define

This change allows the sync barrier instruction to be patched to a nop.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

John David Anglin and committed by
Helge Deller
6caf55e5 f15309d7

+5 -1
+5 -1
arch/parisc/include/asm/barrier.h
··· 2 2 #ifndef __ASM_BARRIER_H 3 3 #define __ASM_BARRIER_H 4 4 5 + #include <asm/alternative.h> 6 + 5 7 #ifndef __ASSEMBLY__ 6 8 7 9 /* The synchronize caches instruction executes as a nop on systems in 8 10 which all memory references are performed in order. */ 9 - #define synchronize_caches() __asm__ __volatile__ ("sync" : : : "memory") 11 + #define synchronize_caches() asm volatile("sync" \ 12 + ALTERNATIVE(ALT_COND_NO_SMP, INSN_NOP) \ 13 + : : : "memory") 10 14 11 15 #if defined(CONFIG_SMP) 12 16 #define mb() do { synchronize_caches(); } while (0)