summaryrefslogtreecommitdiff
path: root/src/mem/cache/base.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-09-03 07:42:50 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-09-03 07:42:50 -0400
commit3be4f4b846f991c98fe1909631996c5b58d52437 (patch)
treed9e603e739e999def333ae04c2386af0c1dd1fdb /src/mem/cache/base.cc
parent5d029463eef3cfafa507dacadccd33402f82029a (diff)
downloadgem5-3be4f4b846f991c98fe1909631996c5b58d52437.tar.xz
mem: Fix a bug in the cache port flow control
This patch fixes a bug in the cache port where the retry flag was reset too early, allowing new requests to arrive before the retry was actually sent, but with the event already scheduled. This caused a deadlock in the interactions with the O3 LSQ. The patche fixes the underlying issue by shifting the resetting of the flag to be done by the event that also calls sendRetry(). The patch also tidies up the flow control in recvTimingReq and ensures that we also check if we already have a retry outstanding.
Diffstat (limited to 'src/mem/cache/base.cc')
-rw-r--r--src/mem/cache/base.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index dd1306270..2a285bf2f 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -106,13 +106,20 @@ BaseCache::CacheSlavePort::clearBlocked()
DPRINTF(CachePort, "Cache port %s accepting new requests\n", name());
blocked = false;
if (mustSendRetry) {
- DPRINTF(CachePort, "Cache port %s sending retry\n", name());
- mustSendRetry = false;
// @TODO: need to find a better time (next bus cycle?)
owner.schedule(sendRetryEvent, curTick() + 1);
}
}
+void
+BaseCache::CacheSlavePort::processSendRetry()
+{
+ DPRINTF(CachePort, "Cache port %s sending retry\n", name());
+
+ // reset the flag and call retry
+ mustSendRetry = false;
+ sendRetry();
+}
void
BaseCache::init()