480c480,481
< bool needsWritable) const
---
> bool needsWritable,
> bool is_whole_line_write) const
503c504,505
< if (cpu_pkt->cmd == MemCmd::WriteLineReq) {
---
> assert(cpu_pkt->cmd != MemCmd::WriteLineReq || is_whole_line_write);
> if (is_whole_line_write) {
583c585,586
< PacketPtr bus_pkt = createMissPacket(pkt, blk, pkt->needsWritable());
---
> PacketPtr bus_pkt = createMissPacket(pkt, blk, pkt->needsWritable(),
> pkt->isWholeLineWrite(blkSize));
618c621
< } else if (pkt->cmd == MemCmd::WriteLineReq) {
---
> } else if (pkt->isWholeLineWrite(blkSize)) {
623c626
< blk = handleFill(pkt, blk, writebacks,
---
> blk = handleFill(bus_pkt, blk, writebacks,
679c682,683
< bool is_invalidate = pkt->isInvalidate();
---
> bool is_invalidate = pkt->isInvalidate() &&
> !mshr->wasWholeLineWrite;
709,714d712
< // we got the block in a writable state, so promote
< // any deferred targets if possible
< mshr->promoteWritable();
< // NB: we use the original packet here and not the response!
< blk = handleFill(tgt_pkt, blk, writebacks,
< targets.allocOnFill);
716,718c714
<
< // discard the invalidation response
< is_invalidate = false;
---
> assert(blk->isWritable());