summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRene de Jong <rene.dejong@arm.com>2013-03-26 14:46:51 -0400
committerRene de Jong <rene.dejong@arm.com>2013-03-26 14:46:51 -0400
commit87089175ccdbec433668765b32b608fe266b7ebf (patch)
tree71c26d11176f60f5fe78d70aa16a4cc93eac8c82 /src
parent08f7a8bc005507117ffda41f283adecf7e4d24f2 (diff)
downloadgem5-87089175ccdbec433668765b32b608fe266b7ebf.tar.xz
mem: Cancel cache retry event when blocking port
This patch solves the corner case scenario where the sendRetryEvent could be scheduled twice, when an io device stresses the IOcache in the system. This should not be possible in the cache system.
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/base.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 476c086ed..85265b61e 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 ARM Limited
+ * Copyright (c) 2012-2013 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -88,6 +88,13 @@ BaseCache::CacheSlavePort::setBlocked()
assert(!blocked);
DPRINTF(CachePort, "Cache port %s blocking new requests\n", name());
blocked = true;
+ // if we already scheduled a retry in this cycle, but it has not yet
+ // happened, cancel it
+ if (sendRetryEvent.scheduled()) {
+ owner.deschedule(sendRetryEvent);
+ DPRINTF(CachePort, "Cache port %s deschedule retry\n", name());
+ mustSendRetry = true;
+ }
}
void