433,439c433,435
< // a writeback that misses needs to allocate a new block
< blk = allocateBlock(pkt->getAddr(), pkt->isSecure(),
< writebacks);
< if (!blk) {
< // no replaceable block available: give up, fwd to
< // next level.
< incMissCount(pkt);
---
> if (pkt->writeThrough()) {
> // if this is a write through packet, we don't try to
> // allocate if the block is not present
441,442c437,447
< }
< tags->insertBlock(pkt, blk);
---
> } else {
> // a writeback that misses needs to allocate a new block
> blk = allocateBlock(pkt->getAddr(), pkt->isSecure(),
> writebacks);
> if (!blk) {
> // no replaceable block available: give up, fwd to
> // next level.
> incMissCount(pkt);
> return false;
> }
> tags->insertBlock(pkt, blk);
444,446c449,452
< blk->status = (BlkValid | BlkReadable);
< if (pkt->isSecure()) {
< blk->status |= BlkSecure;
---
> blk->status = (BlkValid | BlkReadable);
> if (pkt->isSecure()) {
> blk->status |= BlkSecure;
> }
454c460,462
< blk->status |= BlkDirty;
---
> if (!pkt->writeThrough()) {
> blk->status |= BlkDirty;
> }
464c472,474
< return true;
---
> // if this a write-through packet it will be sent to cache
> // below
> return !pkt->writeThrough();
1626c1636
< Cache::writecleanBlk(CacheBlk *blk)
---
> Cache::writecleanBlk(CacheBlk *blk, Request::Flags dest)
1643a1654,1657
> if (dest) {
> req->setFlags(dest);
> pkt->setWriteThrough();
> }