diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2011-09-13 12:06:13 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2011-09-13 12:06:13 -0500 |
commit | 0c29a97ba90b6416014efee232efd9fea2f974d6 (patch) | |
tree | 935b0361a700936e96e7681dcdb2fc89793fd7df /src/mem | |
parent | e4830ad2eb85b9fef8f6e01b6bcbe34983f1d912 (diff) | |
download | gem5-0c29a97ba90b6416014efee232efd9fea2f974d6.tar.xz |
Prefetch: Don't prefetch if address is in the write queue.
Check that we're not currently writing back an address the prefetcher is trying
to prefetch before issuing it. We previously checked the mshrQueue and the cache
itself, but forgot to check the writeBuffer. This fixes a memory corrucption
issue with an L2 prefetcher.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index b29d52f78..a56495abb 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -1437,7 +1437,8 @@ Cache<TagStore>::getNextMSHR() PacketPtr pkt = prefetcher->getPacket(); if (pkt) { Addr pf_addr = blockAlign(pkt->getAddr()); - if (!tags->findBlock(pf_addr) && !mshrQueue.findMatch(pf_addr)) { + if (!tags->findBlock(pf_addr) && !mshrQueue.findMatch(pf_addr) && + !writeBuffer.findMatch(pf_addr)) { // Update statistic on number of prefetches issued // (hwpf_mshr_misses) mshr_misses[pkt->cmdToIndex()][0/*pkt->req->threadId()*/]++; |