gru: fix prefetch and speculation bugs
Fix several bugs related to prefetch, ordering & speculation: - GRU cch_allocate() instruction causes cacheable memory to be created. Add a barriers to prevent speculation from prefetching data before it exists. - Add memory barriers before cache-flush instructions to ensure that previously stored data is included in the line flushed to memory. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
e006043a4d
commit
67bf04a5c2
@@ -325,6 +325,7 @@ static inline void gru_flush_cache(void *p)
|
||||
static inline void gru_start_instruction(struct gru_instruction *ins, int op32)
|
||||
{
|
||||
gru_ordered_store_int(ins, op32);
|
||||
mb();
|
||||
gru_flush_cache(ins);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user