aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2011-05-02 16:36:48 -0400
committerChris Metcalf <cmetcalf@tilera.com>2011-05-04 14:41:20 -0400
commitd07bd86d82622247dba8cc29974d3860f857ea33 (patch)
treed6f1c7059c125e61ac7956e4c4bc4d58416a5096 /arch/tile
parent5386e735897afd8bcd332caf21a5f68d9e0e81c6 (diff)
arch/tile: clarify flush_buffer()/finv_buffer() function names
They are only applicable for locally-homecached memory ranges, so change their names to {flush,finv}_buffer_local(). Change inv_buffer() to just do an mf instead of any kind of fancier barrier, since you're obviously not going to be waiting for anything once the local homecache is invalidated. Fix tilepro.c network driver not to bother calling finv_buffer when stopping the EPP, but just mf after memset to ensure that it will not see any packet data after we finish stopping; use finv_buffer_remote() when doing exit-time cleanup. This also fixes a (not very interesting) generic Linux build failure where drivers/scsi/st.c declares its own flush_buffer(). Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/include/asm/cacheflush.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/tile/include/asm/cacheflush.h b/arch/tile/include/asm/cacheflush.h
index 12fb0fb330ee..e925f4bb498f 100644
--- a/arch/tile/include/asm/cacheflush.h
+++ b/arch/tile/include/asm/cacheflush.h
@@ -116,22 +116,28 @@ 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. */
120static inline void inv_buffer(void *buffer, size_t size) 120static 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/*
127static 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 */
130static 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/*
134static 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 */
140static 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();