gru: fix prefetch and speculation bugs
authorJack Steiner <steiner@sgi.com>
Wed, 16 Dec 2009 00:48:11 +0000 (16:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:15 +0000 (07:20 -0800)
commit67bf04a5c2574e9495f660f418f6df776821d578
treeff28ab4983b007136da88786c8966ea1598841a0
parente006043a4d2da52bba9fd9cb7e5a22e2951ff69b
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>
drivers/misc/sgi-gru/gru_instructions.h
drivers/misc/sgi-gru/grufault.c
drivers/misc/sgi-gru/gruhandles.c
drivers/misc/sgi-gru/grukservices.c
drivers/misc/sgi-gru/grumain.c