summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorAnthony Gutierrez <atgutier@umich.edu>2012-07-27 16:08:04 -0400
committerAnthony Gutierrez <atgutier@umich.edu>2012-07-27 16:08:04 -0400
commit7bf14aedbf0a3b41e8a94701c582baf0d67a66fa (patch)
treef07731e5166664adecc541451aa154c3afefe3f0 /src/mem
parent2eb6b403c976c7909a065b70ef831f4a309455b3 (diff)
downloadgem5-7bf14aedbf0a3b41e8a94701c582baf0d67a66fa.tar.xz
cache: don't allow dirty data in the i-cache
removes the optimization that forwards an exclusive copy to a requester on a read, only for the i-cache. this optimization isn't necessary because we typically won't be writing to the i-cache.
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/cache/cache_impl.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 7b332e31d..8e6c39644 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -172,7 +172,7 @@ Cache<TagStore>::satisfyCpuSideRequest(PacketPtr pkt, BlkType *blk,
// on ReadExReq we give up our copy unconditionally
tags->invalidateBlk(blk);
} else if (blk->isWritable() && !pending_downgrade
- && !pkt->sharedAsserted()) {
+ && !pkt->sharedAsserted() && !pkt->req->isInstFetch()) {
// we can give the requester an exclusive copy (by not
// asserting shared line) on a read request if:
// - we have an exclusive copy at this level (& below)
@@ -180,7 +180,9 @@ Cache<TagStore>::satisfyCpuSideRequest(PacketPtr pkt, BlkType *blk,
// signaling another read request
// - no other cache above has a copy (otherwise it
// would have asseretd shared line on request)
-
+ // - we are not satisfying an instruction fetch (this
+ // prevents dirty data in the i-cache)
+
if (blk->isDirty()) {
// special considerations if we're owner:
if (!deferred_response && !isTopLevel) {