Fixes for blocking in the caches that needed to be pulled

src/mem/cache/base_cache.cc:
    Add in retry path for blocking with multi-level caches
src/mem/cache/base_cache.hh:
    Pull more of the blocking fixes into head
src/mem/packet.hh:
    Fix typo

--HG--
extra : convert_revision : d4d149adfa414136ebd2c4789b739bb065710f7a
This commit is contained in:
Ron Dreslinski
2006-08-16 15:54:02 -04:00
parent 890f0fc782
commit 8a82553aec
3 changed files with 71 additions and 11 deletions

View File

@@ -98,6 +98,8 @@ class BaseCache : public MemObject
virtual int deviceBlockSize();
virtual void recvRetry();
public:
void setBlocked();
@@ -407,17 +409,23 @@ class BaseCache : public MemObject
void clearBlocked(BlockedCause cause)
{
uint8_t flag = 1 << cause;
blocked &= ~flag;
blockedSnoop &= ~flag;
DPRINTF(Cache,"Unblocking for cause %s, causes left=%i\n",
cause, blocked);
if (!isBlocked()) {
blocked_cycles[cause] += curTick - blockedCycle;
DPRINTF(Cache,"Unblocking from all causes\n");
cpuSidePort->clearBlocked();
if (blocked & flag)
{
blocked &= ~flag;
if (!isBlocked()) {
blocked_cycles[cause] += curTick - blockedCycle;
DPRINTF(Cache,"Unblocking from all causes\n");
cpuSidePort->clearBlocked();
}
}
if (!isBlockedForSnoop()) {
memSidePort->clearBlocked();
if (blockedSnoop & flag)
{
blockedSnoop &= ~flag;
if (!isBlockedForSnoop()) {
memSidePort->clearBlocked();
}
}
}