base.cc (14035:60068a2d56e0) | base.cc (14118:3d2ee7721eb0) |
---|---|
1/* 2 * Copyright (c) 2012-2013, 2018-2019 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 --- 1395 unchanged lines hidden (view full) --- 1404 if (pkt->cacheResponding()) { 1405 // we got the block in Modified state, and invalidated the 1406 // owners copy 1407 blk->status |= BlkDirty; 1408 1409 chatty_assert(!isReadOnly, "Should never see dirty snoop response " 1410 "in read-only cache %s\n", name()); 1411 | 1/* 2 * Copyright (c) 2012-2013, 2018-2019 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 --- 1395 unchanged lines hidden (view full) --- 1404 if (pkt->cacheResponding()) { 1405 // we got the block in Modified state, and invalidated the 1406 // owners copy 1407 blk->status |= BlkDirty; 1408 1409 chatty_assert(!isReadOnly, "Should never see dirty snoop response " 1410 "in read-only cache %s\n", name()); 1411 |
1412 } else if (pkt->cmd.isSWPrefetch() && pkt->needsWritable()) { 1413 // All other copies of the block were invalidated and we 1414 // have an exclusive copy. 1415 1416 // The coherence protocol assumes that if we fetched an 1417 // exclusive copy of the block, we have the intention to 1418 // modify it. Therefore the MSHR for the PrefetchExReq has 1419 // been the point of ordering and this cache has commited 1420 // to respond to snoops for the block. 1421 // 1422 // In most cases this is true anyway - a PrefetchExReq 1423 // will be followed by a WriteReq. However, if that 1424 // doesn't happen, the block is not marked as dirty and 1425 // the cache doesn't respond to snoops that has committed 1426 // to do so. 1427 // 1428 // To avoid deadlocks in cases where there is a snoop 1429 // between the PrefetchExReq and the expected WriteReq, we 1430 // proactively mark the block as Dirty. 1431 1432 blk->status |= BlkDirty; 1433 1434 panic_if(!isReadOnly, "Prefetch exclusive requests from read-only " 1435 "cache %s\n", name()); | |
1436 } 1437 } 1438 1439 DPRINTF(Cache, "Block addr %#llx (%s) moving from state %x to %s\n", 1440 addr, is_secure ? "s" : "ns", old_state, blk->print()); 1441 1442 // if we got new data, copy it in (checking for a read response 1443 // and a response that has data is the same in the end) --- 1251 unchanged lines hidden --- | 1412 } 1413 } 1414 1415 DPRINTF(Cache, "Block addr %#llx (%s) moving from state %x to %s\n", 1416 addr, is_secure ? "s" : "ns", old_state, blk->print()); 1417 1418 // if we got new data, copy it in (checking for a read response 1419 // and a response that has data is the same in the end) --- 1251 unchanged lines hidden --- |