Deleted Added
sdiff udiff text old ( 11742:3dcf0b891749 ) new ( 11744:5d33c6972dda )
full compact
1/*
2 * Copyright (c) 2010-2016 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 166 unchanged lines hidden (view full) ---

175 if (blk->checkWrite(pkt)) {
176 pkt->writeDataToBlock(blk->data, blkSize);
177 }
178 // Always mark the line as dirty (and thus transition to the
179 // Modified state) even if we are a failed StoreCond so we
180 // supply data to any snoops that have appended themselves to
181 // this cache before knowing the store will fail.
182 blk->status |= BlkDirty;
183 DPRINTF(CacheVerbose, "%s for %s addr %#llx size %d (write)\n",
184 __func__, pkt->cmdString(), pkt->getAddr(), pkt->getSize());
185 } else if (pkt->isRead()) {
186 if (pkt->isLLSC()) {
187 blk->trackLoadLocked(pkt);
188 }
189
190 // all read responses have a data payload
191 assert(pkt->hasRespData());
192 pkt->setDataFromBlock(blk->data, blkSize);

--- 74 unchanged lines hidden (view full) ---

267 // has the line in Shared state needs to be made aware
268 // that the data it already has is in fact dirty
269 pkt->setCacheResponding();
270 blk->status &= ~BlkDirty;
271 }
272 } else {
273 assert(pkt->isInvalidate());
274 invalidateBlock(blk);
275 DPRINTF(CacheVerbose, "%s for %s addr %#llx size %d (invalidation)\n",
276 __func__, pkt->cmdString(), pkt->getAddr(), pkt->getSize());
277 }
278}
279
280/////////////////////////////////////////////////////
281//
282// Access path: requests coming in from the CPU side
283//
284/////////////////////////////////////////////////////

--- 4 unchanged lines hidden (view full) ---

289{
290 // sanity check
291 assert(pkt->isRequest());
292
293 chatty_assert(!(isReadOnly && pkt->isWrite()),
294 "Should never see a write in a read-only cache %s\n",
295 name());
296
297 DPRINTF(CacheVerbose, "%s for %s addr %#llx size %d\n", __func__,
298 pkt->cmdString(), pkt->getAddr(), pkt->getSize());
299
300 if (pkt->req->isUncacheable()) {
301 DPRINTF(Cache, "%s%s addr %#llx uncacheable\n", pkt->cmdString(),
302 pkt->req->isInstFetch() ? " (ifetch)" : "",
303 pkt->getAddr());
304
305 // flush and invalidate any existing block
306 CacheBlk *old_blk(tags->findBlock(pkt->getAddr(), pkt->isSecure()));
307 if (old_blk && old_blk->isValid()) {
308 if (old_blk->isDirty() || writebackClean)
309 writebacks.push_back(writebackBlk(old_blk));
310 else
311 writebacks.push_back(cleanEvictBlk(old_blk));

--- 8 unchanged lines hidden (view full) ---

320 }
321
322 ContextID id = pkt->req->hasContextId() ?
323 pkt->req->contextId() : InvalidContextID;
324 // Here lat is the value passed as parameter to accessBlock() function
325 // that can modify its value.
326 blk = tags->accessBlock(pkt->getAddr(), pkt->isSecure(), lat, id);
327
328 DPRINTF(Cache, "%s%s addr %#llx size %d (%s) %s\n", pkt->cmdString(),
329 pkt->req->isInstFetch() ? " (ifetch)" : "",
330 pkt->getAddr(), pkt->getSize(), pkt->isSecure() ? "s" : "ns",
331 blk ? "hit " + blk->print() : "miss");
332
333
334 if (pkt->isEviction()) {
335 // We check for presence of block in above caches before issuing
336 // Writeback or CleanEvict to write buffer. Therefore the only
337 // possible cases can be of a CleanEvict packet coming from above
338 // encountering a Writeback generated in this cache peer cache and

--- 199 unchanged lines hidden (view full) ---

538 delete wbPkt;
539 }
540}
541
542
543void
544Cache::recvTimingSnoopResp(PacketPtr pkt)
545{
546 DPRINTF(Cache, "%s for %s addr %#llx size %d\n", __func__,
547 pkt->cmdString(), pkt->getAddr(), pkt->getSize());
548
549 assert(pkt->isResponse());
550 assert(!system->bypassCaches());
551
552 // determine if the response is from a snoop request we created
553 // (in which case it should be in the outstandingSnoop), or if we
554 // merely forwarded someone else's snoop request
555 const bool forwardAsSnoop = outstandingSnoop.find(pkt->req) ==

--- 49 unchanged lines hidden (view full) ---

605 }
606
607 promoteWholeLineWrites(pkt);
608
609 if (pkt->cacheResponding()) {
610 // a cache above us (but not where the packet came from) is
611 // responding to the request, in other words it has the line
612 // in Modified or Owned state
613 DPRINTF(Cache, "Cache above responding to %#llx (%s): "
614 "not responding\n",
615 pkt->getAddr(), pkt->isSecure() ? "s" : "ns");
616
617 // if the packet needs the block to be writable, and the cache
618 // that has promised to respond (setting the cache responding
619 // flag) is not providing writable (it is in Owned rather than
620 // the Modified state), we know that there may be other Shared
621 // copies in the system; go out and invalidate them all
622 assert(pkt->needsWritable() && !pkt->responderHadWritable());
623

--- 107 unchanged lines hidden (view full) ---

731
732 // In this case we are considering request_time that takes
733 // into account the delay of the xbar, if any, and just
734 // lat, neglecting responseLatency, modelling hit latency
735 // just as lookupLatency or or the value of lat overriden
736 // by access(), that calls accessBlock() function.
737 cpuSidePort->schedTimingResp(pkt, request_time, true);
738 } else {
739 DPRINTF(Cache, "%s satisfied %s addr %#llx, no response needed\n",
740 __func__, pkt->cmdString(), pkt->getAddr());
741
742 // queue the packet for deletion, as the sending cache is
743 // still relying on it; if the block is found in access(),
744 // CleanEvict and Writeback messages will be deleted
745 // here as well
746 pendingDelete.reset(pkt);
747 }
748 } else {

--- 59 unchanged lines hidden (view full) ---

808 // Coalesce unless it was a software prefetch (see above).
809 if (pkt) {
810 assert(!pkt->isWriteback());
811 // CleanEvicts corresponding to blocks which have
812 // outstanding requests in MSHRs are simply sunk here
813 if (pkt->cmd == MemCmd::CleanEvict) {
814 pendingDelete.reset(pkt);
815 } else {
816 DPRINTF(Cache, "%s coalescing MSHR for %s addr %#llx "
817 "size %d\n", __func__, pkt->cmdString(),
818 pkt->getAddr(), pkt->getSize());
819
820 assert(pkt->req->masterId() < system->maxMasters());
821 mshr_hits[pkt->cmdToIndex()][pkt->req->masterId()]++;
822 // We use forward_time here because it is the same
823 // considering new targets. We have multiple
824 // requests for the same address here. It
825 // specifies the latency to allocate an internal
826 // buffer and to schedule an event to the queued

--- 135 unchanged lines hidden (view full) ---

962 // packet as having sharers (not passing writable), pass that info
963 // downstream
964 if (cpu_pkt->hasSharers() && !needsWritable) {
965 // note that cpu_pkt may have spent a considerable time in the
966 // MSHR queue and that the information could possibly be out
967 // of date, however, there is no harm in conservatively
968 // assuming the block has sharers
969 pkt->setHasSharers();
970 DPRINTF(Cache, "%s passing hasSharers from %s to %s addr %#llx "
971 "size %d\n",
972 __func__, cpu_pkt->cmdString(), pkt->cmdString(),
973 pkt->getAddr(), pkt->getSize());
974 }
975
976 // the packet should be block aligned
977 assert(pkt->getAddr() == blockAlign(pkt->getAddr()));
978
979 pkt->allocate();
980 DPRINTF(Cache, "%s created %s from %s for addr %#llx size %d\n",
981 __func__, pkt->cmdString(), cpu_pkt->cmdString(), pkt->getAddr(),
982 pkt->getSize());
983 return pkt;
984}
985
986
987Tick
988Cache::recvAtomic(PacketPtr pkt)
989{
990 // We are in atomic mode so we pay just for lookupLatency here.
991 Cycles lat = lookupLatency;
992
993 // Forward the request if the system is in cache bypass mode.
994 if (system->bypassCaches())
995 return ticksToCycles(memSidePort->sendAtomic(pkt));
996
997 promoteWholeLineWrites(pkt);
998
999 // follow the same flow as in recvTimingReq, and check if a cache
1000 // above us is responding
1001 if (pkt->cacheResponding()) {
1002 DPRINTF(Cache, "Cache above responding to %#llx (%s): "
1003 "not responding\n",
1004 pkt->getAddr(), pkt->isSecure() ? "s" : "ns");
1005
1006 // if a cache is responding, and it had the line in Owned
1007 // rather than Modified state, we need to invalidate any
1008 // copies that are not on the same path to memory
1009 assert(pkt->needsWritable() && !pkt->responderHadWritable());
1010 lat += ticksToCycles(memSidePort->sendAtomic(pkt));
1011
1012 return lat * clockPeriod();

--- 28 unchanged lines hidden (view full) ---

1041 bool is_forward = (bus_pkt == nullptr);
1042
1043 if (is_forward) {
1044 // just forwarding the same request to the next level
1045 // no local cache operation involved
1046 bus_pkt = pkt;
1047 }
1048
1049 DPRINTF(Cache, "Sending an atomic %s for %#llx (%s)\n",
1050 bus_pkt->cmdString(), bus_pkt->getAddr(),
1051 bus_pkt->isSecure() ? "s" : "ns");
1052
1053#if TRACING_ON
1054 CacheBlk::State old_state = blk ? blk->status : 0;
1055#endif
1056
1057 lat += ticksToCycles(memSidePort->sendAtomic(bus_pkt));
1058
1059 bool is_invalidate = bus_pkt->isInvalidate();
1060
1061 // We are now dealing with the response handling
1062 DPRINTF(Cache, "Receive response: %s for addr %#llx (%s) in "
1063 "state %i\n", bus_pkt->cmdString(), bus_pkt->getAddr(),
1064 bus_pkt->isSecure() ? "s" : "ns",
1065 old_state);
1066
1067 // If packet was a forward, the response (if any) is already
1068 // in place in the bus_pkt == pkt structure, so we don't need
1069 // to do anything. Otherwise, use the separate bus_pkt to
1070 // generate response to pkt and then delete it.
1071 if (!is_forward) {
1072 if (pkt->needsResponse()) {
1073 assert(bus_pkt->isResponse());

--- 119 unchanged lines hidden (view full) ---

1193 (mshr && mshr->inService && mshr->isPendingModified()));
1194
1195 bool done = have_dirty
1196 || cpuSidePort->checkFunctional(pkt)
1197 || mshrQueue.checkFunctional(pkt, blk_addr)
1198 || writeBuffer.checkFunctional(pkt, blk_addr)
1199 || memSidePort->checkFunctional(pkt);
1200
1201 DPRINTF(CacheVerbose, "functional %s %#llx (%s) %s%s%s\n",
1202 pkt->cmdString(), pkt->getAddr(), is_secure ? "s" : "ns",
1203 (blk && blk->isValid()) ? "valid " : "",
1204 have_data ? "data " : "", done ? "done " : "");
1205
1206 // We're leaving the cache, so pop cache->name() label
1207 pkt->popLabel();
1208
1209 if (done) {
1210 pkt->makeResponse();

--- 38 unchanged lines hidden (view full) ---

1249 // all header delay should be paid for by the crossbar, unless
1250 // this is a prefetch response from above
1251 panic_if(pkt->headerDelay != 0 && pkt->cmd != MemCmd::HardPFResp,
1252 "%s saw a non-zero packet delay\n", name());
1253
1254 bool is_error = pkt->isError();
1255
1256 if (is_error) {
1257 DPRINTF(Cache, "Cache received packet with error for addr %#llx (%s), "
1258 "cmd: %s\n", pkt->getAddr(), pkt->isSecure() ? "s" : "ns",
1259 pkt->cmdString());
1260 }
1261
1262 DPRINTF(Cache, "Handling response %s for addr %#llx size %d (%s)\n",
1263 pkt->cmdString(), pkt->getAddr(), pkt->getSize(),
1264 pkt->isSecure() ? "s" : "ns");
1265
1266 // if this is a write, we should be looking at an uncacheable
1267 // write
1268 if (pkt->isWrite()) {
1269 assert(pkt->req->isUncacheable());
1270 handleUncacheableWriteResp(pkt);
1271 return;
1272 }

--- 156 unchanged lines hidden (view full) ---

1429 if (is_error)
1430 tgt_pkt->copyError(pkt);
1431 if (tgt_pkt->cmd == MemCmd::ReadResp &&
1432 (is_invalidate || mshr->hasPostInvalidate())) {
1433 // If intermediate cache got ReadRespWithInvalidate,
1434 // propagate that. Response should not have
1435 // isInvalidate() set otherwise.
1436 tgt_pkt->cmd = MemCmd::ReadRespWithInvalidate;
1437 DPRINTF(Cache, "%s updated cmd to %s for addr %#llx\n",
1438 __func__, tgt_pkt->cmdString(), tgt_pkt->getAddr());
1439 }
1440 // Reset the bus additional time as it is now accounted for
1441 tgt_pkt->headerDelay = tgt_pkt->payloadDelay = 0;
1442 cpuSidePort->schedTimingResp(tgt_pkt, completion_time, true);
1443 break;
1444
1445 case MSHR::Target::FromPrefetcher:
1446 assert(tgt_pkt->cmd == MemCmd::HardPFReq);

--- 78 unchanged lines hidden (view full) ---

1525 if (isCachedAbove(wcPkt))
1526 delete wcPkt;
1527 else
1528 allocateWriteBuffer(wcPkt, forward_time);
1529 }
1530 blk->invalidate();
1531 }
1532
1533 DPRINTF(CacheVerbose, "Leaving %s with %s for addr %#llx\n", __func__,
1534 pkt->cmdString(), pkt->getAddr());
1535 delete pkt;
1536}
1537
1538PacketPtr
1539Cache::writebackBlk(CacheBlk *blk)
1540{
1541 chatty_assert(!isReadOnly || writebackClean,
1542 "Writeback from read-only cache");

--- 9 unchanged lines hidden (view full) ---

1552 req->taskId(blk->task_id);
1553 blk->task_id= ContextSwitchTaskId::Unknown;
1554 blk->tickInserted = curTick();
1555
1556 PacketPtr pkt =
1557 new Packet(req, blk->isDirty() ?
1558 MemCmd::WritebackDirty : MemCmd::WritebackClean);
1559
1560 DPRINTF(Cache, "Create Writeback %#llx writable: %d, dirty: %d\n",
1561 pkt->getAddr(), blk->isWritable(), blk->isDirty());
1562
1563 if (blk->isWritable()) {
1564 // not asserting shared means we pass the block in modified
1565 // state, mark our own block non-writeable
1566 blk->status &= ~BlkWritable;
1567 } else {
1568 // we are in the Owned state, tell the receiver
1569 pkt->setHasSharers();

--- 21 unchanged lines hidden (view full) ---

1591 req->setFlags(Request::SECURE);
1592
1593 req->taskId(blk->task_id);
1594 blk->task_id = ContextSwitchTaskId::Unknown;
1595 blk->tickInserted = curTick();
1596
1597 PacketPtr pkt = new Packet(req, MemCmd::CleanEvict);
1598 pkt->allocate();
1599 DPRINTF(Cache, "%s%s %x Create CleanEvict\n", pkt->cmdString(),
1600 pkt->req->isInstFetch() ? " (ifetch)" : "",
1601 pkt->getAddr());
1602
1603 return pkt;
1604}
1605
1606void
1607Cache::memWriteback()
1608{
1609 CacheBlkVisitorWrapper visitor(*this, &Cache::writebackVisitor);

--- 231 unchanged lines hidden (view full) ---

1841void
1842Cache::doTimingSupplyResponse(PacketPtr req_pkt, const uint8_t *blk_data,
1843 bool already_copied, bool pending_inval)
1844{
1845 // sanity check
1846 assert(req_pkt->isRequest());
1847 assert(req_pkt->needsResponse());
1848
1849 DPRINTF(Cache, "%s for %s addr %#llx size %d\n", __func__,
1850 req_pkt->cmdString(), req_pkt->getAddr(), req_pkt->getSize());
1851 // timing-mode snoop responses require a new packet, unless we
1852 // already made a copy...
1853 PacketPtr pkt = req_pkt;
1854 if (!already_copied)
1855 // do not clear flags, and allocate space for data if the
1856 // packet needs it (the only packets that carry data are read
1857 // responses)
1858 pkt = new Packet(req_pkt, false, req_pkt->isRead());

--- 15 unchanged lines hidden (view full) ---

1874 pkt->cmd = MemCmd::ReadRespWithInvalidate;
1875 }
1876 // Here we consider forward_time, paying for just forward latency and
1877 // also charging the delay provided by the xbar.
1878 // forward_time is used as send_time in next allocateWriteBuffer().
1879 Tick forward_time = clockEdge(forwardLatency) + pkt->headerDelay;
1880 // Here we reset the timing of the packet.
1881 pkt->headerDelay = pkt->payloadDelay = 0;
1882 DPRINTF(CacheVerbose,
1883 "%s created response: %s addr %#llx size %d tick: %lu\n",
1884 __func__, pkt->cmdString(), pkt->getAddr(), pkt->getSize(),
1885 forward_time);
1886 memSidePort->schedTimingSnoopResp(pkt, forward_time, true);
1887}
1888
1889uint32_t
1890Cache::handleSnoop(PacketPtr pkt, CacheBlk *blk, bool is_timing,
1891 bool is_deferred, bool pending_inval)
1892{
1893 DPRINTF(CacheVerbose, "%s for %s addr %#llx size %d\n", __func__,
1894 pkt->cmdString(), pkt->getAddr(), pkt->getSize());
1895 // deferred snoops can only happen in timing mode
1896 assert(!(is_deferred && !is_timing));
1897 // pending_inval only makes sense on deferred snoops
1898 assert(!(pending_inval && !is_deferred));
1899 assert(pkt->isRequest());
1900
1901 // the packet may get modified if we or a forwarded snooper
1902 // responds in atomic mode, so remember a few things about the
1903 // original packet up front
1904 bool invalidate = pkt->isInvalidate();
1905 bool M5_VAR_USED needs_writable = pkt->needsWritable();
1906
1907 // at the moment we could get an uncacheable write which does not
1908 // have the invalidate flag, and we need a suitable way of dealing
1909 // with this case
1910 panic_if(invalidate && pkt->req->isUncacheable(),
1911 "%s got an invalidating uncacheable snoop request %s to %#llx",
1912 name(), pkt->cmdString(), pkt->getAddr());
1913
1914 uint32_t snoop_delay = 0;
1915
1916 if (forwardSnoops) {
1917 // first propagate snoop upward to see if anyone above us wants to
1918 // handle it. save & restore packet src since it will get
1919 // rewritten to be relative to cpu-side bus (if any)
1920 bool alreadyResponded = pkt->cacheResponding();

--- 36 unchanged lines hidden (view full) ---

1957 // cache-to-cache response from some upper cache:
1958 // forward response to original requester
1959 assert(pkt->isResponse());
1960 }
1961 }
1962 }
1963
1964 if (!blk || !blk->isValid()) {
1965 if (is_deferred) {
1966 // we no longer have the block, and will not respond, but a
1967 // packet was allocated in MSHR::handleSnoop and we have
1968 // to delete it
1969 assert(pkt->needsResponse());
1970
1971 // we have passed the block to a cache upstream, that
1972 // cache should be responding
1973 assert(pkt->cacheResponding());
1974
1975 delete pkt;
1976 }
1977
1978 DPRINTF(CacheVerbose, "%s snoop miss for %s addr %#llx size %d\n",
1979 __func__, pkt->cmdString(), pkt->getAddr(), pkt->getSize());
1980 return snoop_delay;
1981 } else {
1982 DPRINTF(Cache, "%s snoop hit for %s addr %#llx size %d, "
1983 "old state is %s\n", __func__, pkt->cmdString(),
1984 pkt->getAddr(), pkt->getSize(), blk->print());
1985 }
1986
1987 chatty_assert(!(isReadOnly && blk->isDirty()),
1988 "Should never have a dirty block in a read-only cache %s\n",
1989 name());
1990
1991 // We may end up modifying both the block state and the packet (if
1992 // we respond in atomic mode), so just figure out what to do now

--- 5 unchanged lines hidden (view full) ---

1998 bool have_writable = blk->isWritable();
1999
2000 // Invalidate any prefetch's from below that would strip write permissions
2001 // MemCmd::HardPFReq is only observed by upstream caches. After missing
2002 // above and in it's own cache, a new MemCmd::ReadReq is created that
2003 // downstream caches observe.
2004 if (pkt->mustCheckAbove()) {
2005 DPRINTF(Cache, "Found addr %#llx in upper level cache for snoop %s "
2006 "from lower cache\n", pkt->getAddr(), pkt->cmdString());
2007 pkt->setBlockCached();
2008 return snoop_delay;
2009 }
2010
2011 if (pkt->isRead() && !invalidate) {
2012 // reading without requiring the line in a writable state
2013 assert(!needs_writable);
2014 pkt->setHasSharers();

--- 26 unchanged lines hidden (view full) ---

2041 // copy below and all other copies will be invalidates
2042 // through express snoops, and if needsWritable is not set
2043 // we already called setHasSharers above
2044 }
2045
2046 // if we are returning a writable and dirty (Modified) line,
2047 // we should be invalidating the line
2048 panic_if(!invalidate && !pkt->hasSharers(),
2049 "%s is passing a Modified line through %s to %#llx, "
2050 "but keeping the block",
2051 name(), pkt->cmdString(), pkt->getAddr());
2052
2053 if (is_timing) {
2054 doTimingSupplyResponse(pkt, blk->data, is_deferred, pending_inval);
2055 } else {
2056 pkt->makeAtomicResponse();
2057 // packets such as upgrades do not actually have any data
2058 // payload
2059 if (pkt->hasData())

--- 25 unchanged lines hidden (view full) ---

2085
2086 return snoop_delay;
2087}
2088
2089
2090void
2091Cache::recvTimingSnoopReq(PacketPtr pkt)
2092{
2093 DPRINTF(CacheVerbose, "%s for %s addr %#llx size %d\n", __func__,
2094 pkt->cmdString(), pkt->getAddr(), pkt->getSize());
2095
2096 // Snoops shouldn't happen when bypassing caches
2097 assert(!system->bypassCaches());
2098
2099 // no need to snoop requests that are not in range
2100 if (!inRange(pkt->getAddr())) {
2101 return;
2102 }

--- 10 unchanged lines hidden (view full) ---

2113 // tentative, for cases where we return before an upward snoop
2114 // happens below.
2115 pkt->snoopDelay = std::max<uint32_t>(pkt->snoopDelay,
2116 lookupLatency * clockPeriod());
2117
2118 // Inform request(Prefetch, CleanEvict or Writeback) from below of
2119 // MSHR hit, set setBlockCached.
2120 if (mshr && pkt->mustCheckAbove()) {
2121 DPRINTF(Cache, "Setting block cached for %s from"
2122 "lower cache on mshr hit %#x\n",
2123 pkt->cmdString(), pkt->getAddr());
2124 pkt->setBlockCached();
2125 return;
2126 }
2127
2128 // Let the MSHR itself track the snoop and decide whether we want
2129 // to go ahead and do the regular cache snoop
2130 if (mshr && mshr->handleSnoop(pkt, order++)) {
2131 DPRINTF(Cache, "Deferring snoop on in-service MSHR to blk %#llx (%s)."

--- 20 unchanged lines hidden (view full) ---

2152 assert(wb_pkt->isEviction());
2153
2154 if (pkt->isEviction()) {
2155 // if the block is found in the write queue, set the BLOCK_CACHED
2156 // flag for Writeback/CleanEvict snoop. On return the snoop will
2157 // propagate the BLOCK_CACHED flag in Writeback packets and prevent
2158 // any CleanEvicts from travelling down the memory hierarchy.
2159 pkt->setBlockCached();
2160 DPRINTF(Cache, "Squashing %s from lower cache on writequeue hit"
2161 " %#x\n", pkt->cmdString(), pkt->getAddr());
2162 return;
2163 }
2164
2165 // conceptually writebacks are no different to other blocks in
2166 // this cache, so the behaviour is modelled after handleSnoop,
2167 // the difference being that instead of querying the block
2168 // state to determine if it is dirty and writable, we use the
2169 // command and fields of the writeback packet

--- 195 unchanged lines hidden (view full) ---

2365bool
2366Cache::sendMSHRQueuePacket(MSHR* mshr)
2367{
2368 assert(mshr);
2369
2370 // use request from 1st target
2371 PacketPtr tgt_pkt = mshr->getTarget()->pkt;
2372
2373 DPRINTF(Cache, "%s MSHR %s for addr %#llx size %d\n", __func__,
2374 tgt_pkt->cmdString(), tgt_pkt->getAddr(),
2375 tgt_pkt->getSize());
2376
2377 CacheBlk *blk = tags->findBlock(mshr->blkAddr, mshr->isSecure);
2378
2379 if (tgt_pkt->cmd == MemCmd::HardPFReq && forwardSnoops) {
2380 // we should never have hardware prefetches to allocated
2381 // blocks
2382 assert(blk == nullptr);
2383

--- 101 unchanged lines hidden (view full) ---

2485bool
2486Cache::sendWriteQueuePacket(WriteQueueEntry* wq_entry)
2487{
2488 assert(wq_entry);
2489
2490 // always a single target for write queue entries
2491 PacketPtr tgt_pkt = wq_entry->getTarget()->pkt;
2492
2493 DPRINTF(Cache, "%s write %s for addr %#llx size %d\n", __func__,
2494 tgt_pkt->cmdString(), tgt_pkt->getAddr(),
2495 tgt_pkt->getSize());
2496
2497 // forward as is, both for evictions and uncacheable writes
2498 if (!memSidePort->sendTimingReq(tgt_pkt)) {
2499 // note that we have now masked any requestBus and
2500 // schedSendEvent (we will wait for a retry before
2501 // doing anything), and this is so even if we do not
2502 // care about this packet and might override it before
2503 // it gets retried

--- 185 unchanged lines hidden ---