cache.cc (12349:47f454120200) | cache.cc (12351:17eaa27bef22) |
---|---|
1/* 2 * Copyright (c) 2010-2017 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 --- 1078 unchanged lines hidden (view full) --- 1087 1088 if (pkt->isClean() && blk && blk->isDirty()) { 1089 // A cache clean opearation is looking for a dirty 1090 // block. If a dirty block is encountered a WriteClean 1091 // will update any copies to the path to the memory 1092 // until the point of reference. 1093 DPRINTF(CacheVerbose, "%s: packet %s found block: %s\n", 1094 __func__, pkt->print(), blk->print()); | 1/* 2 * Copyright (c) 2010-2017 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 --- 1078 unchanged lines hidden (view full) --- 1087 1088 if (pkt->isClean() && blk && blk->isDirty()) { 1089 // A cache clean opearation is looking for a dirty 1090 // block. If a dirty block is encountered a WriteClean 1091 // will update any copies to the path to the memory 1092 // until the point of reference. 1093 DPRINTF(CacheVerbose, "%s: packet %s found block: %s\n", 1094 __func__, pkt->print(), blk->print()); |
1095 PacketPtr wb_pkt = writecleanBlk(blk, pkt->req->getDest()); | 1095 PacketPtr wb_pkt = writecleanBlk(blk, pkt->req->getDest(), pkt->id); |
1096 writebacks.push_back(wb_pkt); 1097 pkt->setSatisfied(); 1098 } 1099 1100 // handle writebacks resulting from the access here to ensure they 1101 // logically proceed anything happening below 1102 doWritebacksAtomic(writebacks); 1103 --- 570 unchanged lines hidden (view full) --- 1674 1675 pkt->allocate(); 1676 std::memcpy(pkt->getPtr<uint8_t>(), blk->data, blkSize); 1677 1678 return pkt; 1679} 1680 1681PacketPtr | 1096 writebacks.push_back(wb_pkt); 1097 pkt->setSatisfied(); 1098 } 1099 1100 // handle writebacks resulting from the access here to ensure they 1101 // logically proceed anything happening below 1102 doWritebacksAtomic(writebacks); 1103 --- 570 unchanged lines hidden (view full) --- 1674 1675 pkt->allocate(); 1676 std::memcpy(pkt->getPtr<uint8_t>(), blk->data, blkSize); 1677 1678 return pkt; 1679} 1680 1681PacketPtr |
1682Cache::writecleanBlk(CacheBlk *blk, Request::Flags dest) | 1682Cache::writecleanBlk(CacheBlk *blk, Request::Flags dest, PacketId id) |
1683{ 1684 Request *req = new Request(tags->regenerateBlkAddr(blk->tag, blk->set), 1685 blkSize, 0, Request::wbMasterId); 1686 if (blk->isSecure()) { 1687 req->setFlags(Request::SECURE); 1688 } 1689 req->taskId(blk->task_id); 1690 blk->task_id = ContextSwitchTaskId::Unknown; | 1683{ 1684 Request *req = new Request(tags->regenerateBlkAddr(blk->tag, blk->set), 1685 blkSize, 0, Request::wbMasterId); 1686 if (blk->isSecure()) { 1687 req->setFlags(Request::SECURE); 1688 } 1689 req->taskId(blk->task_id); 1690 blk->task_id = ContextSwitchTaskId::Unknown; |
1691 PacketPtr pkt = new Packet(req, MemCmd::WriteClean); | 1691 PacketPtr pkt = new Packet(req, MemCmd::WriteClean, blkSize, id); |
1692 DPRINTF(Cache, "Create %s writable: %d, dirty: %d\n", pkt->print(), 1693 blk->isWritable(), blk->isDirty()); 1694 // make sure the block is not marked dirty 1695 blk->status &= ~BlkDirty; 1696 pkt->allocate(); 1697 // We inform the cache below that the block has sharers in the 1698 // system as we retain our copy. 1699 pkt->setHasSharers(); --- 388 unchanged lines hidden (view full) --- 2088 } 2089 2090 bool respond = false; 2091 bool blk_valid = blk && blk->isValid(); 2092 if (pkt->isClean()) { 2093 if (blk_valid && blk->isDirty()) { 2094 DPRINTF(CacheVerbose, "%s: packet (snoop) %s found block: %s\n", 2095 __func__, pkt->print(), blk->print()); | 1692 DPRINTF(Cache, "Create %s writable: %d, dirty: %d\n", pkt->print(), 1693 blk->isWritable(), blk->isDirty()); 1694 // make sure the block is not marked dirty 1695 blk->status &= ~BlkDirty; 1696 pkt->allocate(); 1697 // We inform the cache below that the block has sharers in the 1698 // system as we retain our copy. 1699 pkt->setHasSharers(); --- 388 unchanged lines hidden (view full) --- 2088 } 2089 2090 bool respond = false; 2091 bool blk_valid = blk && blk->isValid(); 2092 if (pkt->isClean()) { 2093 if (blk_valid && blk->isDirty()) { 2094 DPRINTF(CacheVerbose, "%s: packet (snoop) %s found block: %s\n", 2095 __func__, pkt->print(), blk->print()); |
2096 PacketPtr wb_pkt = writecleanBlk(blk, pkt->req->getDest()); | 2096 PacketPtr wb_pkt = writecleanBlk(blk, pkt->req->getDest(), pkt->id); |
2097 PacketList writebacks; 2098 writebacks.push_back(wb_pkt); 2099 2100 if (is_timing) { 2101 // anything that is merely forwarded pays for the forward 2102 // latency and the delay provided by the crossbar 2103 Tick forward_time = clockEdge(forwardLatency) + 2104 pkt->headerDelay; --- 533 unchanged lines hidden (view full) --- 2638 markInService(mshr, pending_modified_resp); 2639 if (pkt->isClean() && blk && blk->isDirty()) { 2640 // A cache clean opearation is looking for a dirty 2641 // block. If a dirty block is encountered a WriteClean 2642 // will update any copies to the path to the memory 2643 // until the point of reference. 2644 DPRINTF(CacheVerbose, "%s: packet %s found block: %s\n", 2645 __func__, pkt->print(), blk->print()); | 2097 PacketList writebacks; 2098 writebacks.push_back(wb_pkt); 2099 2100 if (is_timing) { 2101 // anything that is merely forwarded pays for the forward 2102 // latency and the delay provided by the crossbar 2103 Tick forward_time = clockEdge(forwardLatency) + 2104 pkt->headerDelay; --- 533 unchanged lines hidden (view full) --- 2638 markInService(mshr, pending_modified_resp); 2639 if (pkt->isClean() && blk && blk->isDirty()) { 2640 // A cache clean opearation is looking for a dirty 2641 // block. If a dirty block is encountered a WriteClean 2642 // will update any copies to the path to the memory 2643 // until the point of reference. 2644 DPRINTF(CacheVerbose, "%s: packet %s found block: %s\n", 2645 __func__, pkt->print(), blk->print()); |
2646 PacketPtr wb_pkt = writecleanBlk(blk, pkt->req->getDest()); | 2646 PacketPtr wb_pkt = writecleanBlk(blk, pkt->req->getDest(), 2647 pkt->id); |
2647 PacketList writebacks; 2648 writebacks.push_back(wb_pkt); 2649 doWritebacks(writebacks, 0); 2650 } 2651 2652 return false; 2653 } 2654} --- 208 unchanged lines hidden --- | 2648 PacketList writebacks; 2649 writebacks.push_back(wb_pkt); 2650 doWritebacks(writebacks, 0); 2651 } 2652 2653 return false; 2654 } 2655} --- 208 unchanged lines hidden --- |