mem: Remove redundant allocateUncachedReadBuffer in cache
authorAndreas Hansson <andreas.hansson@arm.com>
Fri, 27 Mar 2015 08:55:59 +0000 (04:55 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Fri, 27 Mar 2015 08:55:59 +0000 (04:55 -0400)
This patch removes the no-longer-needed
allocateUncachedReadBuffer. Besides the checks it is exactly the same
as allocateMissBuffer and thus provides no value.

src/mem/cache/base.hh
src/mem/cache/cache_impl.hh

index 16160dba3960d0a33d56cc8d15177b79104b0e64..2bac2d30f2aa28aaf93c92cd9fdcc5d5269ec2ff 100644 (file)
@@ -210,9 +210,7 @@ class BaseCache : public MemObject
      *
      * allocateBufferInternal() function is called in:
      * - MSHR allocateWriteBuffer (unchached write forwarded to WriteBuffer);
-     * - MSHR allocateMissBuffer (cacheable miss in MSHR queue);
-     * - MSHR allocateUncachedReadBuffer (unchached read allocated in MSHR
-     *   queue)
+     * - MSHR allocateMissBuffer (miss in MSHR queue);
      */
     MSHR *allocateBufferInternal(MSHRQueue *mq, Addr addr, int size,
                                  PacketPtr pkt, Tick time, bool requestBus)
@@ -501,7 +499,6 @@ class BaseCache : public MemObject
 
     MSHR *allocateMissBuffer(PacketPtr pkt, Tick time, bool requestBus)
     {
-        assert(!pkt->req->isUncacheable());
         return allocateBufferInternal(&mshrQueue,
                                       blockAlign(pkt->getAddr()), blkSize,
                                       pkt, time, requestBus);
@@ -515,15 +512,6 @@ class BaseCache : public MemObject
                                       pkt, time, requestBus);
     }
 
-    MSHR *allocateUncachedReadBuffer(PacketPtr pkt, Tick time, bool requestBus)
-    {
-        assert(pkt->req->isUncacheable());
-        assert(pkt->isRead());
-        return allocateBufferInternal(&mshrQueue,
-                                      blockAlign(pkt->getAddr()), blkSize,
-                                      pkt, time, requestBus);
-    }
-
     /**
      * Returns true if the cache is blocked for accesses.
      */
index 93ef34bb2bd39411296afa8e3f8565b016541616..daff61d8ea3057a23c03b4432d497c3d59e50d9d 100644 (file)
@@ -555,7 +555,7 @@ Cache<TagStore>::recvTimingReq(PacketPtr pkt)
                                             pkt->headerDelay;
             // Reset the timing of the packet.
             pkt->headerDelay = pkt->payloadDelay = 0;
-            allocateUncachedReadBuffer(pkt, allocate_rd_buffer_time, true);
+            allocateMissBuffer(pkt, allocate_rd_buffer_time, true);
         }
         assert(pkt->needsResponse()); // else we should delete it here??
         return true;