1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Kevin Lim 29 * Korey Sewell 30 */ 31 |
32#include "config/use_checker.hh" 33 34#include "cpu/o3/lsq.hh" 35#include "cpu/o3/lsq_unit.hh" 36#include "base/str.hh" 37#include "mem/packet.hh" 38#include "mem/request.hh" 39 --- 569 unchanged lines hidden (view full) --- 609 DPRINTF(LSQUnit, "D-Cache: Writing back store idx:%i PC:%#x " 610 "to Addr:%#x, data:%#x [sn:%lli]\n", 611 storeWBIdx, inst->readPC(), 612 req->getPaddr(), *(inst->memData), 613 inst->seqNum); 614 615 // @todo: Remove this SC hack once the memory system handles it. 616 if (req->isLocked()) { |
617 if (req->isUncacheable()) { 618 req->setScResult(2); 619 } else { 620 if (cpu->lockFlag) { 621 req->setScResult(1); 622 DPRINTF(LSQUnit, "Store conditional [sn:%lli] succeeded.", 623 inst->seqNum); 624 } else { 625 req->setScResult(0); 626 // Hack: Instantly complete this store. 627// completeDataAccess(data_pkt); 628 DPRINTF(LSQUnit, "Store conditional [sn:%lli] failed. " 629 "Instantly completing it.\n", 630 inst->seqNum); 631 WritebackEvent *wb = new WritebackEvent(inst, data_pkt, this); 632 wb->schedule(curTick + 1); 633 delete state; 634 completeStore(storeWBIdx); 635 incrStIdx(storeWBIdx); 636 continue; 637 } |
638 } 639 } else { 640 // Non-store conditionals do not need a writeback. 641 state->noWB = true; 642 } 643 644 if (!dcachePort->sendTiming(data_pkt)) { 645 if (data_pkt->result == Packet::BadAddress) { --- 112 unchanged lines hidden (view full) --- 758 759 decrStIdx(store_idx); 760 ++lsqSquashedStores; 761 } 762} 763 764template <class Impl> 765void |
766LSQUnit<Impl>::storePostSend(PacketPtr pkt) |
767{ 768 if (isStalled() && 769 storeQueue[storeWBIdx].inst->seqNum == stallingStoreIsn) { 770 DPRINTF(LSQUnit, "Unstalling, stalling store [sn:%lli] " 771 "load idx:%i\n", 772 stallingStoreIsn, stallingLoadIdx); 773 stalled = false; 774 stallingStoreIsn = 0; --- 204 unchanged lines hidden --- |