65c65
< pendingDirty(false),
---
> pendingModified(false),
76c76
< : needsExclusive(false), hasUpgrade(false)
---
> : needsWritable(false), hasUpgrade(false)
85,86c85,86
< if (pkt->needsExclusive()) {
< needsExclusive = true;
---
> if (pkt->needsWritable()) {
> needsWritable = true;
241c241
< MSHR::markInService(bool pending_dirty_resp)
---
> MSHR::markInService(bool pending_modified_resp)
253c253
< pendingDirty = targets.needsExclusive || pending_dirty_resp;
---
> pendingModified = targets.needsWritable || pending_modified_resp;
300,303c300,303
< // - this target requires an exclusive block and either we're not
< // getting an exclusive block back or we have already snooped
< // another read request that will downgrade our exclusive block
< // to shared
---
> // - this target requires a writable block and either we're not
> // getting a writable block back or we have already snooped
> // another read request that will downgrade our writable block
> // to non-writable (Shared or Owned)
306,307c306,307
< (pkt->needsExclusive() &&
< (!isPendingDirty() || hasPostDowngrade() || isForward)))) {
---
> (pkt->needsWritable() &&
> (!isPendingModified() || hasPostDowngrade() || isForward)))) {
327c327
< // when we snoop packets the needsExclusive and isInvalidate flags
---
> // when we snoop packets the needsWritable and isInvalidate flags
330,331c330,331
< panic_if(pkt->needsExclusive() != pkt->isInvalidate(),
< "%s got snoop %s to addr %#llx where needsExclusive, "
---
> panic_if(pkt->needsWritable() != pkt->isInvalidate(),
> "%s got snoop %s to addr %#llx where needsWritable, "
349c349
< if (pkt->needsExclusive()) {
---
> if (pkt->needsWritable()) {
359c359
< if (pkt->needsExclusive()) {
---
> if (pkt->needsWritable()) {
372c372
< if (isPendingDirty() || pkt->isInvalidate()) {
---
> if (isPendingModified() || pkt->isInvalidate()) {
374,375c374,376
< // 1. We're awaiting an exclusive copy, so ownership is pending,
< // and we need to deal with the snoop after we receive data.
---
> // 1. We're awaiting a writable copy (Modified or Exclusive),
> // so this MSHR is the orgering point, and we need to respond
> // after we receive data.
382c383
< bool will_respond = isPendingDirty() && pkt->needsResponse() &&
---
> bool will_respond = isPendingModified() && pkt->needsResponse() &&
398,401c399,410
< if (isPendingDirty()) {
< // The new packet will need to get the response from the
< // MSHR already queued up here
< pkt->assertMemInhibit();
---
> if (isPendingModified()) {
> // we are the ordering point, and will consequently
> // respond, and depending on whether the packet
> // needsWritable or not we either pass a Shared line or a
> // Modified line
> pkt->setCacheResponding();
>
> // inform the cache hierarchy that this cache had the line
> // in the Modified state, even if the response is passed
> // as Shared (and thus non-writable)
> pkt->setResponderHadWritable();
>
403,405c412,413
< // to set the exclusive flag, but since the recipient does
< // not care there is no harm in doing so
< pkt->setSupplyExclusive();
---
> // to set the responderHadWritable flag, but since the
> // recipient does not care there is no harm in doing so
408c416
< downstreamPending && targets.needsExclusive);
---
> downstreamPending && targets.needsWritable);
410c418
< if (pkt->needsExclusive()) {
---
> if (pkt->needsWritable()) {
416c424
< if (!pkt->needsExclusive() && !pkt->req->isUncacheable()) {
---
> if (!pkt->needsWritable() && !pkt->req->isUncacheable()) {
418c426
< // our copy if we had an exclusive one
---
> // our copy if we had a writable one
420c428,431
< pkt->assertShared();
---
> // make sure that any downstream cache does not respond with a
> // writable (and dirty) copy even if it has one, unless it was
> // explicitly asked for one
> pkt->setHasSharers();
449c460
< MSHR::promoteExclusive()
---
> MSHR::promoteWritable()
451c462
< if (deferredTargets.needsExclusive &&
---
> if (deferredTargets.needsWritable &&
453,454c464,465
< // We got an exclusive response, but we have deferred targets
< // which are waiting to request an exclusive copy (not because
---
> // We got a writable response, but we have deferred targets
> // which are waiting to request a writable copy (not because
456,462c467,472
< // request was for a read-only (non-exclusive) block, but we
< // got an exclusive copy anyway because of the E part of the
< // MOESI/MESI protocol. Since we got the exclusive copy
< // there's no need to defer the targets, so move them up to
< // the regular target list.
< assert(!targets.needsExclusive);
< targets.needsExclusive = true;
---
> // request was for a read-only block, but we got a writable
> // response anyway. Since we got the writable copy there's no
> // need to defer the targets, so move them up to the regular
> // target list.
> assert(!targets.needsWritable);
> targets.needsWritable = true;
499c509
< needsExclusive() ? "Excl" : "",
---
> needsWritable() ? "Wrtbl" : "",