cache.cc (12574:22936e2eb2da) | cache.cc (12599:43ade6cf92b7) |
---|---|
1/* 2 * Copyright (c) 2010-2018 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 --- 1812 unchanged lines hidden (view full) --- 1821 // It is valid to return nullptr if there is no victim 1822 if (!blk) 1823 return nullptr; 1824 1825 if (blk->isValid()) { 1826 Addr repl_addr = tags->regenerateBlkAddr(blk); 1827 MSHR *repl_mshr = mshrQueue.findMatch(repl_addr, blk->isSecure()); 1828 if (repl_mshr) { | 1/* 2 * Copyright (c) 2010-2018 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 --- 1812 unchanged lines hidden (view full) --- 1821 // It is valid to return nullptr if there is no victim 1822 if (!blk) 1823 return nullptr; 1824 1825 if (blk->isValid()) { 1826 Addr repl_addr = tags->regenerateBlkAddr(blk); 1827 MSHR *repl_mshr = mshrQueue.findMatch(repl_addr, blk->isSecure()); 1828 if (repl_mshr) { |
1829 // must be an outstanding upgrade request | 1829 // must be an outstanding upgrade or clean request |
1830 // on a block we're about to replace... | 1830 // on a block we're about to replace... |
1831 assert(!blk->isWritable() || blk->isDirty()); 1832 assert(repl_mshr->needsWritable()); | 1831 assert((!blk->isWritable() && repl_mshr->needsWritable()) || 1832 repl_mshr->isCleaning()); |
1833 // too hard to replace block with transient state 1834 // allocation failed, block not inserted 1835 return nullptr; 1836 } else { 1837 DPRINTF(Cache, "replacement: replacing %#llx (%s) with %#llx " 1838 "(%s): %s\n", repl_addr, blk->isSecure() ? "s" : "ns", 1839 addr, is_secure ? "s" : "ns", 1840 blk->isDirty() ? "writeback" : "clean"); --- 1047 unchanged lines hidden --- | 1833 // too hard to replace block with transient state 1834 // allocation failed, block not inserted 1835 return nullptr; 1836 } else { 1837 DPRINTF(Cache, "replacement: replacing %#llx (%s) with %#llx " 1838 "(%s): %s\n", repl_addr, blk->isSecure() ? "s" : "ns", 1839 addr, is_secure ? "s" : "ns", 1840 blk->isDirty() ? "writeback" : "clean"); --- 1047 unchanged lines hidden --- |