Rev 3564 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3564 | Rev 4343 | ||
---|---|---|---|
Line 67... | Line 67... | ||
67 | ::: "eax", "ecx", "edx", "esi", "memory" |
67 | ::: "eax", "ecx", "edx", "esi", "memory" |
68 | ); |
68 | ); |
69 | #endif |
69 | #endif |
70 | } |
70 | } |
71 | 71 | ||
72 | #ifdef CONFIG_FENCES_P4 |
72 | #if defined(CONFIG_FENCES_P4) |
73 | # define memory_barrier() asm volatile ("mfence\n" ::: "memory") |
73 | # define memory_barrier() asm volatile ("mfence\n" ::: "memory") |
74 | # define read_barrier() asm volatile ("lfence\n" ::: "memory") |
74 | # define read_barrier() asm volatile ("lfence\n" ::: "memory") |
75 | # ifdef CONFIG_WEAK_MEMORY |
75 | # ifdef CONFIG_WEAK_MEMORY |
76 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
76 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
77 | # else |
77 | # else |
78 | # define write_barrier() asm volatile( "" ::: "memory"); |
78 | # define write_barrier() asm volatile( "" ::: "memory"); |
79 | # endif |
79 | # endif |
80 | #elif CONFIG_FENCES_P3 |
80 | #elif defined(CONFIG_FENCES_P3) |
81 | # define memory_barrier() cpuid_serialization() |
81 | # define memory_barrier() cpuid_serialization() |
82 | # define read_barrier() cpuid_serialization() |
82 | # define read_barrier() cpuid_serialization() |
83 | # ifdef CONFIG_WEAK_MEMORY |
83 | # ifdef CONFIG_WEAK_MEMORY |
84 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
84 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
85 | # else |
85 | # else |