Rev 3134 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3134 | Rev 3903 | ||
---|---|---|---|
Line 56... | Line 56... | ||
56 | "cpuid\n" |
56 | "cpuid\n" |
57 | ::: "eax", "ebx", "ecx", "edx", "memory" |
57 | ::: "eax", "ebx", "ecx", "edx", "memory" |
58 | ); |
58 | ); |
59 | } |
59 | } |
60 | 60 | ||
61 | #ifdef CONFIG_FENCES_P4 |
61 | #if defined(CONFIG_FENCES_P4) |
62 | # define memory_barrier() asm volatile ("mfence\n" ::: "memory") |
62 | # define memory_barrier() asm volatile ("mfence\n" ::: "memory") |
63 | # define read_barrier() asm volatile ("lfence\n" ::: "memory") |
63 | # define read_barrier() asm volatile ("lfence\n" ::: "memory") |
64 | # ifdef CONFIG_WEAK_MEMORY |
64 | # ifdef CONFIG_WEAK_MEMORY |
65 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
65 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
66 | # else |
66 | # else |
67 | # define write_barrier() asm volatile( "" ::: "memory"); |
67 | # define write_barrier() asm volatile( "" ::: "memory"); |
68 | # endif |
68 | # endif |
69 | #elif CONFIG_FENCES_P3 |
69 | #elif defined(CONFIG_FENCES_P3) |
70 | # define memory_barrier() cpuid_serialization() |
70 | # define memory_barrier() cpuid_serialization() |
71 | # define read_barrier() cpuid_serialization() |
71 | # define read_barrier() cpuid_serialization() |
72 | # ifdef CONFIG_WEAK_MEMORY |
72 | # ifdef CONFIG_WEAK_MEMORY |
73 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
73 | # define write_barrier() asm volatile ("sfence\n" ::: "memory") |
74 | # else |
74 | # else |