mem-cache: Virtualize block print
[gem5.git] / src / mem / cache / write_queue.cc
index 57489c6f00f9263cd3e299e61c2620f8fa738e58..11a2620dfda24b19b1f2630dfdff120bb5eeb9a8 100644 (file)
@@ -48,7 +48,9 @@
 
 #include "mem/cache/write_queue.hh"
 
-using namespace std;
+#include <cassert>
+
+#include "mem/cache/write_queue_entry.hh"
 
 WriteQueue::WriteQueue(const std::string &_label,
                        int num_entries, int reserve)
@@ -75,17 +77,10 @@ WriteQueue::allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt,
 void
 WriteQueue::markInService(WriteQueueEntry *entry)
 {
-    if (!entry->isUncacheable()) {
-        // a normal eviction, such as a writeback or a clean evict, no
-        // more to do as we are done from the perspective of this
-        // cache
-        entry->popTarget();
-        deallocate(entry);
-    } else {
-        // uncacheable write, and we will eventually receive a
-        // response
-        entry->markInService();
-        readyList.erase(entry->readyIter);
-        _numInService += 1;
-    }
+    // for a normal eviction, such as a writeback or a clean evict,
+    // there is no more to do as we are done from the perspective of
+    // this cache, and for uncacheable write we do not need the entry
+    // as part of the response handling
+    entry->popTarget();
+    deallocate(entry);
 }