Deleted Added
sdiff udiff text old ( 12722:d84f756891fe ) new ( 12723:530dc4bf1a00 )
full compact
1/*
2 * Copyright (c) 2010-2018 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

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

298 DPRINTF(CacheVerbose, "%s for %s\n", __func__, pkt->print());
299
300 if (pkt->req->isUncacheable()) {
301 DPRINTF(Cache, "uncacheable: %s\n", pkt->print());
302
303 // flush and invalidate any existing block
304 CacheBlk *old_blk(tags->findBlock(pkt->getAddr(), pkt->isSecure()));
305 if (old_blk && old_blk->isValid()) {
306 if (old_blk->isDirty() || writebackClean)
307 writebacks.push_back(writebackBlk(old_blk));
308 else
309 writebacks.push_back(cleanEvictBlk(old_blk));
310 invalidateBlock(old_blk);
311 }
312
313 blk = nullptr;
314 // lookupLatency is the latency in case the request is uncacheable.
315 lat = lookupLatency;
316 return false;
317 }
318

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

1243 } else {
1244 // the writeback/clean eviction happens after the call to
1245 // recvAtomic has finished (but before any successive
1246 // calls), so that the response handling from the fill is
1247 // allowed to happen first
1248 schedule(writebackTempBlockAtomicEvent, curTick());
1249 }
1250
1251 tempBlockWriteback = (blk->isDirty() || writebackClean) ?
1252 writebackBlk(blk) : cleanEvictBlk(blk);
1253 invalidateBlock(blk);
1254 }
1255
1256 if (pkt->needsResponse()) {
1257 pkt->makeAtomicResponse();
1258 }
1259
1260 return lat * clockPeriod();
1261}

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

1638 clockEdge());
1639 if (next_pf_time != MaxTick)
1640 schedMemSideSendEvent(next_pf_time);
1641 }
1642 }
1643
1644 // if we used temp block, check to see if its valid and then clear it out
1645 if (blk == tempBlock && tempBlock->isValid()) {
1646 PacketPtr wb_pkt = tempBlock->isDirty() || writebackClean ?
1647 writebackBlk(blk) : cleanEvictBlk(blk);
1648 writebacks.push_back(wb_pkt);
1649 invalidateBlock(tempBlock);
1650 }
1651
1652 const Tick forward_time = clockEdge(forwardLatency) + pkt->headerDelay;
1653 // copy writebacks to write buffer
1654 doWritebacks(writebacks, forward_time);
1655
1656 DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print());
1657 delete pkt;
1658}
1659
1660PacketPtr
1661Cache::writebackBlk(CacheBlk *blk)
1662{
1663 chatty_assert(!isReadOnly || writebackClean,
1664 "Writeback from read-only cache");
1665 assert(blk && blk->isValid() && (blk->isDirty() || writebackClean));
1666
1667 writebacks[Request::wbMasterId]++;
1668

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

1845 DPRINTF(Cache, "replacement: replacing %#llx (%s) with %#llx "
1846 "(%s): %s\n", repl_addr, blk->isSecure() ? "s" : "ns",
1847 addr, is_secure ? "s" : "ns",
1848 blk->isDirty() ? "writeback" : "clean");
1849
1850 if (blk->wasPrefetched()) {
1851 unusedPrefetches++;
1852 }
1853 // Will send up Writeback/CleanEvict snoops via isCachedAbove
1854 // when pushing this writeback list into the write buffer.
1855 if (blk->isDirty() || writebackClean) {
1856 // Save writeback packet for handling by caller
1857 writebacks.push_back(writebackBlk(blk));
1858 } else {
1859 writebacks.push_back(cleanEvictBlk(blk));
1860 }
1861 invalidateBlock(blk);
1862 replacements++;
1863 }
1864 }
1865
1866 return blk;
1867}
1868
1869void

--- 1027 unchanged lines hidden ---