diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/tile/include/asm/cacheflush.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/tile/include/asm/cacheflush.h')
-rw-r--r-- | arch/tile/include/asm/cacheflush.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/arch/tile/include/asm/cacheflush.h b/arch/tile/include/asm/cacheflush.h index c5741da4eeac..e925f4bb498f 100644 --- a/arch/tile/include/asm/cacheflush.h +++ b/arch/tile/include/asm/cacheflush.h | |||
@@ -116,25 +116,40 @@ static inline void __finv_buffer(void *buffer, size_t size) | |||
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | /* Invalidate a VA range, then memory fence. */ | 119 | /* Invalidate a VA range and wait for it to be complete. */ |
120 | static inline void inv_buffer(void *buffer, size_t size) | 120 | static inline void inv_buffer(void *buffer, size_t size) |
121 | { | 121 | { |
122 | __inv_buffer(buffer, size); | 122 | __inv_buffer(buffer, size); |
123 | mb_incoherent(); | 123 | mb(); |
124 | } | 124 | } |
125 | 125 | ||
126 | /* Flush a VA range, then memory fence. */ | 126 | /* |
127 | static inline void flush_buffer(void *buffer, size_t size) | 127 | * Flush a locally-homecached VA range and wait for the evicted |
128 | * cachelines to hit memory. | ||
129 | */ | ||
130 | static inline void flush_buffer_local(void *buffer, size_t size) | ||
128 | { | 131 | { |
129 | __flush_buffer(buffer, size); | 132 | __flush_buffer(buffer, size); |
130 | mb_incoherent(); | 133 | mb_incoherent(); |
131 | } | 134 | } |
132 | 135 | ||
133 | /* Flush & invalidate a VA range, then memory fence. */ | 136 | /* |
134 | static inline void finv_buffer(void *buffer, size_t size) | 137 | * Flush and invalidate a locally-homecached VA range and wait for the |
138 | * evicted cachelines to hit memory. | ||
139 | */ | ||
140 | static inline void finv_buffer_local(void *buffer, size_t size) | ||
135 | { | 141 | { |
136 | __finv_buffer(buffer, size); | 142 | __finv_buffer(buffer, size); |
137 | mb_incoherent(); | 143 | mb_incoherent(); |
138 | } | 144 | } |
139 | 145 | ||
146 | /* | ||
147 | * Flush and invalidate a VA range that is homed remotely, waiting | ||
148 | * until the memory controller holds the flushed values. If "hfh" is | ||
149 | * true, we will do a more expensive flush involving additional loads | ||
150 | * to make sure we have touched all the possible home cpus of a buffer | ||
151 | * that is homed with "hash for home". | ||
152 | */ | ||
153 | void finv_buffer_remote(void *buffer, size_t size, int hfh); | ||
154 | |||
140 | #endif /* _ASM_TILE_CACHEFLUSH_H */ | 155 | #endif /* _ASM_TILE_CACHEFLUSH_H */ |