mshr.cc (7667:aa8fd8f6a495) | mshr.cc (7669:cc222ba29079) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 58 unchanged lines hidden (view full) --- 67MSHR::TargetList::add(PacketPtr pkt, Tick readyTime, 68 Counter order, Target::Source source, bool markPending) 69{ 70 if (source != Target::FromSnoop) { 71 if (pkt->needsExclusive()) { 72 needsExclusive = true; 73 } 74 | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 58 unchanged lines hidden (view full) --- 67MSHR::TargetList::add(PacketPtr pkt, Tick readyTime, 68 Counter order, Target::Source source, bool markPending) 69{ 70 if (source != Target::FromSnoop) { 71 if (pkt->needsExclusive()) { 72 needsExclusive = true; 73 } 74 |
75 if (pkt->isUpgrade()) { | 75 // StoreCondReq is effectively an upgrade if it's in an MSHR 76 // since it would have been failed already if we didn't have a 77 // read-only copy 78 if (pkt->isUpgrade() || pkt->cmd == MemCmd::StoreCondReq) { |
76 hasUpgrade = true; 77 } 78 } 79 80 if (markPending) { 81 MSHR *mshr = dynamic_cast<MSHR*>(pkt->senderState); 82 if (mshr != NULL) { 83 assert(!mshr->downstreamPending); --- 9 unchanged lines hidden (view full) --- 93replaceUpgrade(PacketPtr pkt) 94{ 95 if (pkt->cmd == MemCmd::UpgradeReq) { 96 pkt->cmd = MemCmd::ReadExReq; 97 DPRINTF(Cache, "Replacing UpgradeReq with ReadExReq\n"); 98 } else if (pkt->cmd == MemCmd::SCUpgradeReq) { 99 pkt->cmd = MemCmd::SCUpgradeFailReq; 100 DPRINTF(Cache, "Replacing SCUpgradeReq with SCUpgradeFailReq\n"); | 79 hasUpgrade = true; 80 } 81 } 82 83 if (markPending) { 84 MSHR *mshr = dynamic_cast<MSHR*>(pkt->senderState); 85 if (mshr != NULL) { 86 assert(!mshr->downstreamPending); --- 9 unchanged lines hidden (view full) --- 96replaceUpgrade(PacketPtr pkt) 97{ 98 if (pkt->cmd == MemCmd::UpgradeReq) { 99 pkt->cmd = MemCmd::ReadExReq; 100 DPRINTF(Cache, "Replacing UpgradeReq with ReadExReq\n"); 101 } else if (pkt->cmd == MemCmd::SCUpgradeReq) { 102 pkt->cmd = MemCmd::SCUpgradeFailReq; 103 DPRINTF(Cache, "Replacing SCUpgradeReq with SCUpgradeFailReq\n"); |
104 } else if (pkt->cmd == MemCmd::StoreCondReq) { 105 pkt->cmd = MemCmd::StoreCondFailReq; 106 DPRINTF(Cache, "Replacing StoreCondReq with StoreCondFailReq\n"); |
|
101 } 102} 103 104 105void 106MSHR::TargetList::replaceUpgrades() 107{ 108 if (!hasUpgrade) --- 340 unchanged lines hidden --- | 107 } 108} 109 110 111void 112MSHR::TargetList::replaceUpgrades() 113{ 114 if (!hasUpgrade) --- 340 unchanged lines hidden --- |