summaryrefslogtreecommitdiff
path: root/src/mem/cache/miss
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/miss')
-rw-r--r--src/mem/cache/miss/mshr.cc51
-rw-r--r--src/mem/cache/miss/mshr.hh6
2 files changed, 2 insertions, 55 deletions
diff --git a/src/mem/cache/miss/mshr.cc b/src/mem/cache/miss/mshr.cc
index 23645cb27..63b3cacc2 100644
--- a/src/mem/cache/miss/mshr.cc
+++ b/src/mem/cache/miss/mshr.cc
@@ -76,7 +76,6 @@ MSHR::allocate(Addr _addr, int _size, PacketPtr target,
deferredNeedsExclusive = false;
pendingInvalidate = false;
pendingShared = false;
- replacedPendingUpgrade = false;
data = NULL;
}
@@ -185,61 +184,13 @@ MSHR::promoteDeferredTargets()
void
-MSHR::handleReplacement(CacheBlk *blk, int blkSize)
-{
- // must be an outstanding upgrade request on block we're about to
- // replace...
- assert(!blk->isWritable());
- assert(needsExclusive);
- replacedPendingUpgrade = true;
-
- // if it's dirty, just remember what happened and allow the
- // writeback to continue. we'll reissue a ReadEx later whether
- // the upgrade succeeds or not
- if (blk->isDirty()) {
- replacedPendingUpgradeDirty = true;
- return;
- }
-
- // if not dirty, we need to save it off as it will be only valid
- // copy in system if upgrade is successful (and may need to be
- // written back then, as the current owner if any will be
- // invalidating its block)
- replacedPendingUpgradeDirty = false;
- data = new uint8_t[blkSize];
- std::memcpy(data, blk->data, blkSize);
-}
-
-
-bool
MSHR::handleFill(Packet *pkt, CacheBlk *blk)
{
- if (replacedPendingUpgrade) {
- // block was replaced while upgrade request was in service
- assert(pkt->cmd == MemCmd::UpgradeResp);
- assert(blk == NULL);
- assert(replacedPendingUpgrade);
- replacedPendingUpgrade = false; // reset
- if (replacedPendingUpgradeDirty) {
- // we wrote back the previous copy; just reissue as a ReadEx
- return false;
- }
-
- // previous copy was not dirty, but we are now owner... fake out
- // cache by taking saved data and converting UpgradeResp to
- // ReadExResp
- assert(data);
- pkt->cmd = MemCmd::ReadExResp;
- pkt->setData(data);
- delete [] data;
- data = NULL;
- } else if (pendingShared) {
+ if (pendingShared) {
// we snooped another read while this read was in
// service... assert shared line on its behalf
pkt->assertShared();
}
-
- return true;
}
diff --git a/src/mem/cache/miss/mshr.hh b/src/mem/cache/miss/mshr.hh
index 07fe5c96c..4db7b1cfe 100644
--- a/src/mem/cache/miss/mshr.hh
+++ b/src/mem/cache/miss/mshr.hh
@@ -106,9 +106,6 @@ class MSHR : public Packet::SenderState
bool deferredNeedsExclusive;
bool pendingInvalidate;
bool pendingShared;
- /** Is there a pending upgrade that got replaced? */
- bool replacedPendingUpgrade;
- bool replacedPendingUpgradeDirty;
/** Thread number of the miss. */
short threadNum;
@@ -213,8 +210,7 @@ public:
bool promoteDeferredTargets();
- void handleReplacement(CacheBlk *blk, int blkSize);
- bool handleFill(Packet *pkt, CacheBlk *blk);
+ void handleFill(Packet *pkt, CacheBlk *blk);
/**
* Prints the contents of this MSHR to stderr.