cache.cc (11865:608f8c34f549) | cache.cc (11867:1342b4dbc556) |
---|---|
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 --- 291 unchanged lines hidden (view full) --- 300 301 // flush and invalidate any existing block 302 CacheBlk *old_blk(tags->findBlock(pkt->getAddr(), pkt->isSecure())); 303 if (old_blk && old_blk->isValid()) { 304 if (old_blk->isDirty() || writebackClean) 305 writebacks.push_back(writebackBlk(old_blk)); 306 else 307 writebacks.push_back(cleanEvictBlk(old_blk)); | 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 --- 291 unchanged lines hidden (view full) --- 300 301 // flush and invalidate any existing block 302 CacheBlk *old_blk(tags->findBlock(pkt->getAddr(), pkt->isSecure())); 303 if (old_blk && old_blk->isValid()) { 304 if (old_blk->isDirty() || writebackClean) 305 writebacks.push_back(writebackBlk(old_blk)); 306 else 307 writebacks.push_back(cleanEvictBlk(old_blk)); |
308 tags->invalidate(old_blk); 309 old_blk->invalidate(); | 308 invalidateBlock(old_blk); |
310 } 311 312 blk = nullptr; 313 // lookupLatency is the latency in case the request is uncacheable. 314 lat = lookupLatency; 315 return false; 316 } 317 --- 804 unchanged lines hidden (view full) --- 1122 // recvAtomic has finished (but before any successive 1123 // calls), so that the response handling from the fill is 1124 // allowed to happen first 1125 schedule(writebackTempBlockAtomicEvent, curTick()); 1126 } 1127 1128 tempBlockWriteback = (blk->isDirty() || writebackClean) ? 1129 writebackBlk(blk) : cleanEvictBlk(blk); | 309 } 310 311 blk = nullptr; 312 // lookupLatency is the latency in case the request is uncacheable. 313 lat = lookupLatency; 314 return false; 315 } 316 --- 804 unchanged lines hidden (view full) --- 1121 // recvAtomic has finished (but before any successive 1122 // calls), so that the response handling from the fill is 1123 // allowed to happen first 1124 schedule(writebackTempBlockAtomicEvent, curTick()); 1125 } 1126 1127 tempBlockWriteback = (blk->isDirty() || writebackClean) ? 1128 writebackBlk(blk) : cleanEvictBlk(blk); |
1130 blk->invalidate(); | 1129 invalidateBlock(blk); |
1131 } 1132 1133 if (pkt->needsResponse()) { 1134 pkt->makeAtomicResponse(); 1135 } 1136 1137 return lat * clockPeriod(); 1138} --- 387 unchanged lines hidden (view full) --- 1526 PacketPtr wcPkt = cleanEvictBlk(blk); 1527 // Check to see if block is cached above. If not allocate 1528 // write buffer 1529 if (isCachedAbove(wcPkt)) 1530 delete wcPkt; 1531 else 1532 allocateWriteBuffer(wcPkt, forward_time); 1533 } | 1130 } 1131 1132 if (pkt->needsResponse()) { 1133 pkt->makeAtomicResponse(); 1134 } 1135 1136 return lat * clockPeriod(); 1137} --- 387 unchanged lines hidden (view full) --- 1525 PacketPtr wcPkt = cleanEvictBlk(blk); 1526 // Check to see if block is cached above. If not allocate 1527 // write buffer 1528 if (isCachedAbove(wcPkt)) 1529 delete wcPkt; 1530 else 1531 allocateWriteBuffer(wcPkt, forward_time); 1532 } |
1534 blk->invalidate(); | 1533 invalidateBlock(blk); |
1535 } 1536 1537 DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print()); 1538 delete pkt; 1539} 1540 1541PacketPtr 1542Cache::writebackBlk(CacheBlk *blk) --- 112 unchanged lines hidden (view full) --- 1655Cache::invalidateVisitor(CacheBlk &blk) 1656{ 1657 1658 if (blk.isDirty()) 1659 warn_once("Invalidating dirty cache lines. Expect things to break.\n"); 1660 1661 if (blk.isValid()) { 1662 assert(!blk.isDirty()); | 1534 } 1535 1536 DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print()); 1537 delete pkt; 1538} 1539 1540PacketPtr 1541Cache::writebackBlk(CacheBlk *blk) --- 112 unchanged lines hidden (view full) --- 1654Cache::invalidateVisitor(CacheBlk &blk) 1655{ 1656 1657 if (blk.isDirty()) 1658 warn_once("Invalidating dirty cache lines. Expect things to break.\n"); 1659 1660 if (blk.isValid()) { 1661 assert(!blk.isDirty()); |
1663 tags->invalidate(&blk); 1664 blk.invalidate(); | 1662 invalidateBlock(&blk); |
1665 } 1666 1667 return true; 1668} 1669 1670CacheBlk* 1671Cache::allocateBlock(Addr addr, bool is_secure, PacketList &writebacks) 1672{ --- 1003 unchanged lines hidden --- | 1663 } 1664 1665 return true; 1666} 1667 1668CacheBlk* 1669Cache::allocateBlock(Addr addr, bool is_secure, PacketList &writebacks) 1670{ --- 1003 unchanged lines hidden --- |