mshr.cc (10821:581fb2484bd6) mshr.cc (10826:fe0b1f40ea5a)
1/*
2 * Copyright (c) 2012-2013, 2015 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

--- 351 unchanged lines hidden (view full) ---

360 // transaction completes.
361
362 // Actual target device (typ. a memory) will delete the
363 // packet on reception, so we need to save a copy here.
364
365 // Clear flags and also allocate new data as the original
366 // packet data storage may have been deleted by the time we
367 // get to send this packet.
1/*
2 * Copyright (c) 2012-2013, 2015 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

--- 351 unchanged lines hidden (view full) ---

360 // transaction completes.
361
362 // Actual target device (typ. a memory) will delete the
363 // packet on reception, so we need to save a copy here.
364
365 // Clear flags and also allocate new data as the original
366 // packet data storage may have been deleted by the time we
367 // get to send this packet.
368 PacketPtr cp_pkt = new Packet(pkt, true, true);
369 targets.add(cp_pkt, curTick(), _order, Target::FromSnoop,
370 downstreamPending && targets.needsExclusive);
368 PacketPtr cp_pkt = nullptr;
371
372 if (isPendingDirty()) {
369
370 if (isPendingDirty()) {
371 // Case 1: The new packet will need to get the response from the
372 // MSHR already queued up here
373 cp_pkt = new Packet(pkt, true, true);
373 pkt->assertMemInhibit();
374 // in the case of an uncacheable request there is no need
375 // to set the exclusive flag, but since the recipient does
376 // not care there is no harm in doing so
377 pkt->setSupplyExclusive();
374 pkt->assertMemInhibit();
375 // in the case of an uncacheable request there is no need
376 // to set the exclusive flag, but since the recipient does
377 // not care there is no harm in doing so
378 pkt->setSupplyExclusive();
379 } else {
380 // Case 2: We only need to buffer the packet for information
381 // purposes; the original request can proceed without waiting
382 // => Create a copy of the request, as that may get deallocated as
383 // well
384 cp_pkt = new Packet(new Request(*pkt->req), pkt->cmd);
385 DPRINTF(Cache, "Copying packet %p -> %p and request %p -> %p\n",
386 pkt, cp_pkt, pkt->req, cp_pkt->req);
378 }
387 }
388 targets.add(cp_pkt, curTick(), _order, Target::FromSnoop,
389 downstreamPending && targets.needsExclusive);
379
380 if (pkt->needsExclusive()) {
381 // This transaction will take away our pending copy
382 postInvalidate = true;
383 }
384 }
385
386 if (!pkt->needsExclusive() && !pkt->req->isUncacheable()) {

--- 104 unchanged lines hidden ---
390
391 if (pkt->needsExclusive()) {
392 // This transaction will take away our pending copy
393 postInvalidate = true;
394 }
395 }
396
397 if (!pkt->needsExclusive() && !pkt->req->isUncacheable()) {

--- 104 unchanged lines hidden ---