summaryrefslogtreecommitdiff
path: root/src/mem/ruby/structures/CacheMemory.cc
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-27 12:51:40 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-27 12:51:40 -0500
commitfc3d34a4889f96395d7d3185a0c5a2dbb5c77343 (patch)
tree2b5eccd49fab300132e4e4ccf0796cb437295a8e /src/mem/ruby/structures/CacheMemory.cc
parent88b1fd82a6207c38845c3503ab3037ed40225d80 (diff)
downloadgem5-fc3d34a4889f96395d7d3185a0c5a2dbb5c77343.tar.xz
ruby: handle llsc accesses through CacheEntry, not CacheMemory
The sequencer takes care of llsc accesses by calling upon functions from the CacheMemory. This is unnecessary once the required CacheEntry object is available. Thus some of the calls to findTagInSet() are avoided.
Diffstat (limited to 'src/mem/ruby/structures/CacheMemory.cc')
-rw-r--r--src/mem/ruby/structures/CacheMemory.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/ruby/structures/CacheMemory.cc b/src/mem/ruby/structures/CacheMemory.cc
index 7eba450c1..bb26ff03c 100644
--- a/src/mem/ruby/structures/CacheMemory.cc
+++ b/src/mem/ruby/structures/CacheMemory.cc
@@ -413,7 +413,7 @@ CacheMemory::setLocked(Addr address, int context)
int64 cacheSet = addressToCacheSet(address);
int loc = findTagInSet(cacheSet, address);
assert(loc != -1);
- m_cache[cacheSet][loc]->m_locked = context;
+ m_cache[cacheSet][loc]->setLocked(context);
}
void
@@ -424,7 +424,7 @@ CacheMemory::clearLocked(Addr address)
int64 cacheSet = addressToCacheSet(address);
int loc = findTagInSet(cacheSet, address);
assert(loc != -1);
- m_cache[cacheSet][loc]->m_locked = -1;
+ m_cache[cacheSet][loc]->clearLocked();
}
bool
@@ -436,7 +436,7 @@ CacheMemory::isLocked(Addr address, int context)
assert(loc != -1);
DPRINTF(RubyCache, "Testing Lock for addr: %llx cur %d con %d\n",
address, m_cache[cacheSet][loc]->m_locked, context);
- return m_cache[cacheSet][loc]->m_locked == context;
+ return m_cache[cacheSet][loc]->isLocked(context);
}
void