diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-12-28 11:14:16 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-12-28 11:14:16 -0500 |
commit | f6525ff2213311afb83efef95ce02d023010d7b7 (patch) | |
tree | 5231c91a26452f8670f2633dd01c05df69098896 /src/mem | |
parent | fbf3987c7b60334bec7aaac848c0d778c0135213 (diff) | |
download | gem5-f6525ff2213311afb83efef95ce02d023010d7b7.tar.xz |
mem: Remove unused cache squash functionality
This patch removes the unused squash function from the MSHR queue, and
the associated (and also unused) threadNum member from the MSHR.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/cache/cache.cc | 3 | ||||
-rw-r--r-- | src/mem/cache/mshr.cc | 3 | ||||
-rw-r--r-- | src/mem/cache/mshr.hh | 3 | ||||
-rw-r--r-- | src/mem/cache/mshr_queue.cc | 24 | ||||
-rw-r--r-- | src/mem/cache/mshr_queue.hh | 9 |
5 files changed, 2 insertions, 40 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index 489f198c0..c10315499 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -807,9 +807,6 @@ Cache::recvTimingReq(PacketPtr pkt) assert(pkt->req->masterId() < system->maxMasters()); mshr_hits[pkt->cmdToIndex()][pkt->req->masterId()]++; - if (mshr->threadNum != 0/*pkt->req->threadId()*/) { - mshr->threadNum = -1; - } // We use forward_time here because it is the same // considering new targets. We have multiple // requests for the same address here. It diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc index 1a97d5594..7f7b627da 100644 --- a/src/mem/cache/mshr.cc +++ b/src/mem/cache/mshr.cc @@ -67,7 +67,7 @@ MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false), queue(NULL), order(0), blkAddr(0), blkSize(0), isSecure(false), inService(false), isForward(false), allocOnFill(false), - threadNum(InvalidThreadID), data(NULL) + data(NULL) { } @@ -216,7 +216,6 @@ MSHR::allocate(Addr blk_addr, unsigned blk_size, PacketPtr target, _isUncacheable = target->req->isUncacheable(); inService = false; downstreamPending = false; - threadNum = 0; assert(targets.isReset()); // Don't know of a case where we would allocate a new MSHR for a // snoop (mem-side request), so set source according to request here diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh index 45d7628fd..0abb70e29 100644 --- a/src/mem/cache/mshr.hh +++ b/src/mem/cache/mshr.hh @@ -184,9 +184,6 @@ class MSHR : public Packet::SenderState, public Printable assert(inService); return postDowngrade; } - /** Thread number of the miss. */ - ThreadID threadNum; - private: /** Data buffer (if needed). Currently used only for pending diff --git a/src/mem/cache/mshr_queue.cc b/src/mem/cache/mshr_queue.cc index 3aa5d85be..6efd291b8 100644 --- a/src/mem/cache/mshr_queue.cc +++ b/src/mem/cache/mshr_queue.cc @@ -239,30 +239,6 @@ MSHRQueue::forceDeallocateTarget(MSHR *mshr) return was_full && !isFull(); } -void -MSHRQueue::squash(int threadNum) -{ - for (auto i = allocatedList.begin(); i != allocatedList.end();) { - MSHR *mshr = *i; - if (mshr->threadNum == threadNum) { - while (mshr->hasTargets()) { - mshr->popTarget(); - assert(0/*target->req->threadId()*/ == threadNum); - } - assert(!mshr->hasTargets()); - assert(mshr->getNumTargets()==0); - if (!mshr->inService) { - i = deallocateOne(mshr); - } else { - //mshr->pkt->flags &= ~CACHE_LINE_FILL; - ++i; - } - } else { - ++i; - } - } -} - DrainState MSHRQueue::drain() { diff --git a/src/mem/cache/mshr_queue.hh b/src/mem/cache/mshr_queue.hh index 29191a358..a2ad6d020 100644 --- a/src/mem/cache/mshr_queue.hh +++ b/src/mem/cache/mshr_queue.hh @@ -170,7 +170,7 @@ class MSHRQueue : public Drainable /** * Remove a MSHR from the queue. Returns an iterator into the - * allocatedList for faster squash implementation. + * allocatedList. * @param mshr The MSHR to remove. * @return An iterator to the next entry in the allocatedList. */ @@ -200,13 +200,6 @@ class MSHRQueue : public Drainable void markPending(MSHR *mshr); /** - * Squash outstanding requests with the given thread number. If a request - * is in service, just squashes the targets. - * @param threadNum The thread to squash. - */ - void squash(int threadNum); - - /** * Deallocate top target, possibly freeing the MSHR * @return if MSHR queue is no longer full */ |