Replace tests of LOCKED/UNCACHEABLE flags with isLocked()/isUncacheable().
--HG-- extra : convert_revision : f22ce3221d270ecf8631d3dcaed05753accd5461
This commit is contained in:
parent
911381321b
commit
5df93cc1cd
18 changed files with 51 additions and 51 deletions
|
@ -193,7 +193,7 @@ BaseDynInst<Impl>::prefetch(Addr addr, unsigned flags)
|
||||||
// note this is a local, not BaseDynInst::fault
|
// note this is a local, not BaseDynInst::fault
|
||||||
Fault trans_fault = cpu->translateDataReadReq(req);
|
Fault trans_fault = cpu->translateDataReadReq(req);
|
||||||
|
|
||||||
if (trans_fault == NoFault && !(req->flags & UNCACHEABLE)) {
|
if (trans_fault == NoFault && !(req->isUncacheable())) {
|
||||||
// It's a valid address to cacheable space. Record key MemReq
|
// It's a valid address to cacheable space. Record key MemReq
|
||||||
// parameters so we can generate another one just like it for
|
// parameters so we can generate another one just like it for
|
||||||
// the timing access without calling translate() again (which
|
// the timing access without calling translate() again (which
|
||||||
|
|
|
@ -175,7 +175,7 @@ CheckerCPU::read(Addr addr, T &data, unsigned flags)
|
||||||
|
|
||||||
pkt->dataStatic(&data);
|
pkt->dataStatic(&data);
|
||||||
|
|
||||||
if (!(memReq->getFlags() & UNCACHEABLE)) {
|
if (!(memReq->isUncacheable())) {
|
||||||
// Access memory to see if we have the same data
|
// Access memory to see if we have the same data
|
||||||
dcachePort->sendFunctional(pkt);
|
dcachePort->sendFunctional(pkt);
|
||||||
} else {
|
} else {
|
||||||
|
@ -251,9 +251,9 @@ CheckerCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
|
||||||
// This is because the LSQ would have to be snooped in the CPU to
|
// This is because the LSQ would have to be snooped in the CPU to
|
||||||
// verify this data.
|
// verify this data.
|
||||||
if (unverifiedReq &&
|
if (unverifiedReq &&
|
||||||
!(unverifiedReq->getFlags() & UNCACHEABLE) &&
|
!(unverifiedReq->isUncacheable()) &&
|
||||||
(!(unverifiedReq->getFlags() & LOCKED) ||
|
(!(unverifiedReq->isLocked()) ||
|
||||||
((unverifiedReq->getFlags() & LOCKED) &&
|
((unverifiedReq->isLocked()) &&
|
||||||
unverifiedReq->getScResult() == 1))) {
|
unverifiedReq->getScResult() == 1))) {
|
||||||
T inst_data;
|
T inst_data;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -599,7 +599,7 @@ DefaultFetch<Impl>::fetchCacheLine(Addr fetch_PC, Fault &ret_fault, unsigned tid
|
||||||
if (fault == NoFault) {
|
if (fault == NoFault) {
|
||||||
#if 0
|
#if 0
|
||||||
if (cpu->system->memctrl->badaddr(memReq[tid]->paddr) ||
|
if (cpu->system->memctrl->badaddr(memReq[tid]->paddr) ||
|
||||||
memReq[tid]->flags & UNCACHEABLE) {
|
memReq[tid]->isUncacheable()) {
|
||||||
DPRINTF(Fetch, "Fetch: Bad address %#x (hopefully on a "
|
DPRINTF(Fetch, "Fetch: Bad address %#x (hopefully on a "
|
||||||
"misspeculating path)!",
|
"misspeculating path)!",
|
||||||
memReq[tid]->paddr);
|
memReq[tid]->paddr);
|
||||||
|
|
|
@ -492,7 +492,7 @@ LSQUnit<Impl>::read(Request *req, T &data, int load_idx)
|
||||||
// A bit of a hackish way to get uncached accesses to work only if they're
|
// A bit of a hackish way to get uncached accesses to work only if they're
|
||||||
// at the head of the LSQ and are ready to commit (at the head of the ROB
|
// at the head of the LSQ and are ready to commit (at the head of the ROB
|
||||||
// too).
|
// too).
|
||||||
if (req->getFlags() & UNCACHEABLE &&
|
if (req->isUncacheable() &&
|
||||||
(load_idx != loadHead || !load_inst->isAtCommit())) {
|
(load_idx != loadHead || !load_inst->isAtCommit())) {
|
||||||
iewStage->rescheduleMemInst(load_inst);
|
iewStage->rescheduleMemInst(load_inst);
|
||||||
++lsqRescheduledLoads;
|
++lsqRescheduledLoads;
|
||||||
|
@ -509,7 +509,7 @@ LSQUnit<Impl>::read(Request *req, T &data, int load_idx)
|
||||||
load_idx, store_idx, storeHead, req->getPaddr());
|
load_idx, store_idx, storeHead, req->getPaddr());
|
||||||
|
|
||||||
#if FULL_SYSTEM
|
#if FULL_SYSTEM
|
||||||
if (req->getFlags() & LOCKED) {
|
if (req->isLocked()) {
|
||||||
cpu->lockAddr = req->getPaddr();
|
cpu->lockAddr = req->getPaddr();
|
||||||
cpu->lockFlag = true;
|
cpu->lockFlag = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -416,7 +416,7 @@ LSQUnit<Impl>::executeLoad(DynInstPtr &inst)
|
||||||
// realizes there is activity.
|
// realizes there is activity.
|
||||||
// Mark it as executed unless it is an uncached load that
|
// Mark it as executed unless it is an uncached load that
|
||||||
// needs to hit the head of commit.
|
// needs to hit the head of commit.
|
||||||
if (!(inst->req->getFlags() & UNCACHEABLE) || inst->isAtCommit()) {
|
if (!(inst->req->isUncacheable()) || inst->isAtCommit()) {
|
||||||
inst->setExecuted();
|
inst->setExecuted();
|
||||||
}
|
}
|
||||||
iewStage->instToCommit(inst);
|
iewStage->instToCommit(inst);
|
||||||
|
@ -613,8 +613,8 @@ LSQUnit<Impl>::writebackStores()
|
||||||
storeQueue[storeWBIdx].inst->seqNum);
|
storeQueue[storeWBIdx].inst->seqNum);
|
||||||
|
|
||||||
// @todo: Remove this SC hack once the memory system handles it.
|
// @todo: Remove this SC hack once the memory system handles it.
|
||||||
if (req->getFlags() & LOCKED) {
|
if (req->isLocked()) {
|
||||||
if (req->getFlags() & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
req->setScResult(2);
|
req->setScResult(2);
|
||||||
} else {
|
} else {
|
||||||
if (cpu->lockFlag) {
|
if (cpu->lockFlag) {
|
||||||
|
|
|
@ -493,7 +493,7 @@ BackEnd<Impl>::read(RequestPtr req, T &data, int load_idx)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if (!dcacheInterface && (memReq->flags & UNCACHEABLE))
|
if (!dcacheInterface && (memReq->isUncacheable()))
|
||||||
recordEvent("Uncached Read");
|
recordEvent("Uncached Read");
|
||||||
*/
|
*/
|
||||||
return LSQ.read(req, data, load_idx);
|
return LSQ.read(req, data, load_idx);
|
||||||
|
@ -534,7 +534,7 @@ BackEnd<Impl>::write(RequestPtr req, T &data, int store_idx)
|
||||||
*res = memReq->result;
|
*res = memReq->result;
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if (!dcacheInterface && (memReq->flags & UNCACHEABLE))
|
if (!dcacheInterface && (memReq->isUncacheable()))
|
||||||
recordEvent("Uncached Write");
|
recordEvent("Uncached Write");
|
||||||
*/
|
*/
|
||||||
return LSQ.write(req, data, store_idx);
|
return LSQ.write(req, data, store_idx);
|
||||||
|
|
|
@ -1256,7 +1256,7 @@ BackEnd<Impl>::executeInsts()
|
||||||
|
|
||||||
// ++iewExecStoreInsts;
|
// ++iewExecStoreInsts;
|
||||||
|
|
||||||
if (!(inst->req->flags & LOCKED)) {
|
if (!(inst->req->isLocked())) {
|
||||||
inst->setExecuted();
|
inst->setExecuted();
|
||||||
|
|
||||||
instToCommit(inst);
|
instToCommit(inst);
|
||||||
|
|
|
@ -455,12 +455,12 @@ class OzoneCPU : public BaseCPU
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
#if FULL_SYSTEM && defined(TARGET_ALPHA)
|
#if FULL_SYSTEM && defined(TARGET_ALPHA)
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
req->xc->setMiscReg(TheISA::Lock_Addr_DepTag, req->paddr);
|
req->xc->setMiscReg(TheISA::Lock_Addr_DepTag, req->paddr);
|
||||||
req->xc->setMiscReg(TheISA::Lock_Flag_DepTag, true);
|
req->xc->setMiscReg(TheISA::Lock_Flag_DepTag, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
lockAddrList.insert(req->paddr);
|
lockAddrList.insert(req->paddr);
|
||||||
lockFlag = true;
|
lockFlag = true;
|
||||||
}
|
}
|
||||||
|
@ -489,10 +489,10 @@ class OzoneCPU : public BaseCPU
|
||||||
ExecContext *xc;
|
ExecContext *xc;
|
||||||
|
|
||||||
// If this is a store conditional, act appropriately
|
// If this is a store conditional, act appropriately
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
xc = req->xc;
|
xc = req->xc;
|
||||||
|
|
||||||
if (req->flags & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
// Don't update result register (see stq_c in isa_desc)
|
// Don't update result register (see stq_c in isa_desc)
|
||||||
req->result = 2;
|
req->result = 2;
|
||||||
xc->setStCondFailures(0);//Needed? [RGD]
|
xc->setStCondFailures(0);//Needed? [RGD]
|
||||||
|
@ -532,8 +532,8 @@ class OzoneCPU : public BaseCPU
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
if (req->flags & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
req->result = 2;
|
req->result = 2;
|
||||||
} else {
|
} else {
|
||||||
if (this->lockFlag) {
|
if (this->lockFlag) {
|
||||||
|
|
|
@ -493,7 +493,7 @@ FrontEnd<Impl>::fetchCacheLine()
|
||||||
if (fault == NoFault) {
|
if (fault == NoFault) {
|
||||||
#if 0
|
#if 0
|
||||||
if (cpu->system->memctrl->badaddr(memReq->paddr) ||
|
if (cpu->system->memctrl->badaddr(memReq->paddr) ||
|
||||||
memReq->flags & UNCACHEABLE) {
|
memReq->isUncacheable()) {
|
||||||
DPRINTF(FE, "Fetch: Bad address %#x (hopefully on a "
|
DPRINTF(FE, "Fetch: Bad address %#x (hopefully on a "
|
||||||
"misspeculating path!",
|
"misspeculating path!",
|
||||||
memReq->paddr);
|
memReq->paddr);
|
||||||
|
|
|
@ -231,7 +231,7 @@ InorderBackEnd<Impl>::read(Addr addr, T &data, unsigned flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (!dcacheInterface && (memReq->flags & UNCACHEABLE))
|
if (!dcacheInterface && (memReq->isUncacheable()))
|
||||||
recordEvent("Uncached Read");
|
recordEvent("Uncached Read");
|
||||||
*/
|
*/
|
||||||
return fault;
|
return fault;
|
||||||
|
@ -243,7 +243,7 @@ Fault
|
||||||
InorderBackEnd<Impl>::read(MemReqPtr &req, T &data)
|
InorderBackEnd<Impl>::read(MemReqPtr &req, T &data)
|
||||||
{
|
{
|
||||||
#if FULL_SYSTEM && defined(TARGET_ALPHA)
|
#if FULL_SYSTEM && defined(TARGET_ALPHA)
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
req->xc->setMiscReg(TheISA::Lock_Addr_DepTag, req->paddr);
|
req->xc->setMiscReg(TheISA::Lock_Addr_DepTag, req->paddr);
|
||||||
req->xc->setMiscReg(TheISA::Lock_Flag_DepTag, true);
|
req->xc->setMiscReg(TheISA::Lock_Flag_DepTag, true);
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ InorderBackEnd<Impl>::write(T data, Addr addr, unsigned flags, uint64_t *res)
|
||||||
if (res && (fault == NoFault))
|
if (res && (fault == NoFault))
|
||||||
*res = memReq->result;
|
*res = memReq->result;
|
||||||
/*
|
/*
|
||||||
if (!dcacheInterface && (memReq->flags & UNCACHEABLE))
|
if (!dcacheInterface && (memReq->isUncacheable()))
|
||||||
recordEvent("Uncached Write");
|
recordEvent("Uncached Write");
|
||||||
*/
|
*/
|
||||||
return fault;
|
return fault;
|
||||||
|
@ -306,10 +306,10 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data)
|
||||||
ExecContext *xc;
|
ExecContext *xc;
|
||||||
|
|
||||||
// If this is a store conditional, act appropriately
|
// If this is a store conditional, act appropriately
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
xc = req->xc;
|
xc = req->xc;
|
||||||
|
|
||||||
if (req->flags & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
// Don't update result register (see stq_c in isa_desc)
|
// Don't update result register (see stq_c in isa_desc)
|
||||||
req->result = 2;
|
req->result = 2;
|
||||||
xc->setStCondFailures(0);//Needed? [RGD]
|
xc->setStCondFailures(0);//Needed? [RGD]
|
||||||
|
@ -391,7 +391,7 @@ InorderBackEnd<Impl>::read(MemReqPtr &req, T &data, int load_idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (!dcacheInterface && (req->flags & UNCACHEABLE))
|
if (!dcacheInterface && (req->isUncacheable()))
|
||||||
recordEvent("Uncached Read");
|
recordEvent("Uncached Read");
|
||||||
*/
|
*/
|
||||||
return NoFault;
|
return NoFault;
|
||||||
|
@ -455,8 +455,8 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data, int store_idx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
if (req->flags & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
// Don't update result register (see stq_c in isa_desc)
|
// Don't update result register (see stq_c in isa_desc)
|
||||||
req->result = 2;
|
req->result = 2;
|
||||||
} else {
|
} else {
|
||||||
|
@ -469,7 +469,7 @@ InorderBackEnd<Impl>::write(MemReqPtr &req, T &data, int store_idx)
|
||||||
*res = req->result;
|
*res = req->result;
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if (!dcacheInterface && (req->flags & UNCACHEABLE))
|
if (!dcacheInterface && (req->isUncacheable()))
|
||||||
recordEvent("Uncached Write");
|
recordEvent("Uncached Write");
|
||||||
*/
|
*/
|
||||||
return NoFault;
|
return NoFault;
|
||||||
|
|
|
@ -426,7 +426,7 @@ OzoneLSQ<Impl>::read(MemReqPtr &req, T &data, int load_idx)
|
||||||
// at the head of the LSQ and are ready to commit (at the head of the ROB
|
// at the head of the LSQ and are ready to commit (at the head of the ROB
|
||||||
// too).
|
// too).
|
||||||
// @todo: Fix uncached accesses.
|
// @todo: Fix uncached accesses.
|
||||||
if (req->flags & UNCACHEABLE &&
|
if (req->isUncacheable() &&
|
||||||
(load_idx != loadHead || !loadQueue[load_idx]->readyToCommit())) {
|
(load_idx != loadHead || !loadQueue[load_idx]->readyToCommit())) {
|
||||||
|
|
||||||
return TheISA::genMachineCheckFault();
|
return TheISA::genMachineCheckFault();
|
||||||
|
|
|
@ -577,7 +577,7 @@ OzoneLSQ<Impl>::writebackStores()
|
||||||
MemAccessResult result = dcacheInterface->access(req);
|
MemAccessResult result = dcacheInterface->access(req);
|
||||||
|
|
||||||
//@todo temp fix for LL/SC (works fine for 1 CPU)
|
//@todo temp fix for LL/SC (works fine for 1 CPU)
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
req->result=1;
|
req->result=1;
|
||||||
panic("LL/SC! oh no no support!!!");
|
panic("LL/SC! oh no no support!!!");
|
||||||
}
|
}
|
||||||
|
@ -596,7 +596,7 @@ OzoneLSQ<Impl>::writebackStores()
|
||||||
Event *wb = NULL;
|
Event *wb = NULL;
|
||||||
/*
|
/*
|
||||||
typename IEW::LdWritebackEvent *wb = NULL;
|
typename IEW::LdWritebackEvent *wb = NULL;
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
// Stx_C does not generate a system port transaction.
|
// Stx_C does not generate a system port transaction.
|
||||||
req->result=0;
|
req->result=0;
|
||||||
wb = new typename IEW::LdWritebackEvent(storeQueue[storeWBIdx].inst,
|
wb = new typename IEW::LdWritebackEvent(storeQueue[storeWBIdx].inst,
|
||||||
|
@ -630,7 +630,7 @@ OzoneLSQ<Impl>::writebackStores()
|
||||||
// DPRINTF(Activity, "Active st accessing mem hit [sn:%lli]\n",
|
// DPRINTF(Activity, "Active st accessing mem hit [sn:%lli]\n",
|
||||||
// storeQueue[storeWBIdx].inst->seqNum);
|
// storeQueue[storeWBIdx].inst->seqNum);
|
||||||
|
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
// Stx_C does not generate a system port transaction.
|
// Stx_C does not generate a system port transaction.
|
||||||
req->result=1;
|
req->result=1;
|
||||||
typename BackEnd::LdWritebackEvent *wb =
|
typename BackEnd::LdWritebackEvent *wb =
|
||||||
|
|
|
@ -507,7 +507,7 @@ OzoneLWLSQ<Impl>::read(RequestPtr req, T &data, int load_idx)
|
||||||
// at the head of the LSQ and are ready to commit (at the head of the ROB
|
// at the head of the LSQ and are ready to commit (at the head of the ROB
|
||||||
// too).
|
// too).
|
||||||
// @todo: Fix uncached accesses.
|
// @todo: Fix uncached accesses.
|
||||||
if (req->getFlags() & UNCACHEABLE &&
|
if (req->isUncacheable() &&
|
||||||
(inst != loadQueue.back() || !inst->isAtCommit())) {
|
(inst != loadQueue.back() || !inst->isAtCommit())) {
|
||||||
DPRINTF(OzoneLSQ, "[sn:%lli] Uncached load and not head of "
|
DPRINTF(OzoneLSQ, "[sn:%lli] Uncached load and not head of "
|
||||||
"commit/LSQ!\n",
|
"commit/LSQ!\n",
|
||||||
|
@ -659,7 +659,7 @@ OzoneLWLSQ<Impl>::read(RequestPtr req, T &data, int load_idx)
|
||||||
return NoFault;
|
return NoFault;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->getFlags() & LOCKED) {
|
if (req->isLocked()) {
|
||||||
cpu->lockFlag = true;
|
cpu->lockFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -394,7 +394,7 @@ OzoneLWLSQ<Impl>::executeLoad(DynInstPtr &inst)
|
||||||
// Actually probably want the oldest faulting load
|
// Actually probably want the oldest faulting load
|
||||||
if (load_fault != NoFault) {
|
if (load_fault != NoFault) {
|
||||||
DPRINTF(OzoneLSQ, "Load [sn:%lli] has a fault\n", inst->seqNum);
|
DPRINTF(OzoneLSQ, "Load [sn:%lli] has a fault\n", inst->seqNum);
|
||||||
if (!(inst->req->getFlags() & UNCACHEABLE && !inst->isAtCommit())) {
|
if (!(inst->req->isUncacheable() && !inst->isAtCommit())) {
|
||||||
inst->setExecuted();
|
inst->setExecuted();
|
||||||
}
|
}
|
||||||
// Maybe just set it as can commit here, although that might cause
|
// Maybe just set it as can commit here, although that might cause
|
||||||
|
@ -605,8 +605,8 @@ OzoneLWLSQ<Impl>::writebackStores()
|
||||||
inst->seqNum);
|
inst->seqNum);
|
||||||
|
|
||||||
// @todo: Remove this SC hack once the memory system handles it.
|
// @todo: Remove this SC hack once the memory system handles it.
|
||||||
if (req->getFlags() & LOCKED) {
|
if (req->isLocked()) {
|
||||||
if (req->getFlags() & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
req->setScResult(2);
|
req->setScResult(2);
|
||||||
} else {
|
} else {
|
||||||
if (cpu->lockFlag) {
|
if (cpu->lockFlag) {
|
||||||
|
@ -663,7 +663,7 @@ OzoneLWLSQ<Impl>::writebackStores()
|
||||||
if (result != MA_HIT && dcacheInterface->doEvents()) {
|
if (result != MA_HIT && dcacheInterface->doEvents()) {
|
||||||
store_event->miss = true;
|
store_event->miss = true;
|
||||||
typename BackEnd::LdWritebackEvent *wb = NULL;
|
typename BackEnd::LdWritebackEvent *wb = NULL;
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
wb = new typename BackEnd::LdWritebackEvent(inst,
|
wb = new typename BackEnd::LdWritebackEvent(inst,
|
||||||
be);
|
be);
|
||||||
store_event->wbEvent = wb;
|
store_event->wbEvent = wb;
|
||||||
|
@ -690,7 +690,7 @@ OzoneLWLSQ<Impl>::writebackStores()
|
||||||
// DPRINTF(Activity, "Active st accessing mem hit [sn:%lli]\n",
|
// DPRINTF(Activity, "Active st accessing mem hit [sn:%lli]\n",
|
||||||
// inst->seqNum);
|
// inst->seqNum);
|
||||||
|
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
// Stx_C does not generate a system port
|
// Stx_C does not generate a system port
|
||||||
// transaction in the 21264, but that might be
|
// transaction in the 21264, but that might be
|
||||||
// hard to accomplish in this model.
|
// hard to accomplish in this model.
|
||||||
|
|
|
@ -282,7 +282,7 @@ AtomicSimpleCPU::read(Addr addr, T &data, unsigned flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will need a new way to tell if it has a dcache attached.
|
// This will need a new way to tell if it has a dcache attached.
|
||||||
if (req->getFlags() & UNCACHEABLE)
|
if (req->isUncacheable())
|
||||||
recordEvent("Uncached Read");
|
recordEvent("Uncached Read");
|
||||||
|
|
||||||
return fault;
|
return fault;
|
||||||
|
@ -380,7 +380,7 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will need a new way to tell if it's hooked up to a cache or not.
|
// This will need a new way to tell if it's hooked up to a cache or not.
|
||||||
if (req->getFlags() & UNCACHEABLE)
|
if (req->isUncacheable())
|
||||||
recordEvent("Uncached Write");
|
recordEvent("Uncached Write");
|
||||||
|
|
||||||
// If the write needs to have a fault on the access, consider calling
|
// If the write needs to have a fault on the access, consider calling
|
||||||
|
|
|
@ -257,7 +257,7 @@ TimingSimpleCPU::read(Addr addr, T &data, unsigned flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will need a new way to tell if it has a dcache attached.
|
// This will need a new way to tell if it has a dcache attached.
|
||||||
if (req->getFlags() & UNCACHEABLE)
|
if (req->isUncacheable())
|
||||||
recordEvent("Uncached Read");
|
recordEvent("Uncached Read");
|
||||||
|
|
||||||
return fault;
|
return fault;
|
||||||
|
@ -342,7 +342,7 @@ TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will need a new way to tell if it's hooked up to a cache or not.
|
// This will need a new way to tell if it's hooked up to a cache or not.
|
||||||
if (req->getFlags() & UNCACHEABLE)
|
if (req->isUncacheable())
|
||||||
recordEvent("Uncached Write");
|
recordEvent("Uncached Write");
|
||||||
|
|
||||||
// If the write needs to have a fault on the access, consider calling
|
// If the write needs to have a fault on the access, consider calling
|
||||||
|
|
|
@ -237,7 +237,7 @@ class SimpleThread : public ThreadState
|
||||||
Fault read(RequestPtr &req, T &data)
|
Fault read(RequestPtr &req, T &data)
|
||||||
{
|
{
|
||||||
#if FULL_SYSTEM && THE_ISA == ALPHA_ISA
|
#if FULL_SYSTEM && THE_ISA == ALPHA_ISA
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
req->xc->setMiscReg(TheISA::Lock_Addr_DepTag, req->paddr);
|
req->xc->setMiscReg(TheISA::Lock_Addr_DepTag, req->paddr);
|
||||||
req->xc->setMiscReg(TheISA::Lock_Flag_DepTag, true);
|
req->xc->setMiscReg(TheISA::Lock_Flag_DepTag, true);
|
||||||
}
|
}
|
||||||
|
@ -256,10 +256,10 @@ class SimpleThread : public ThreadState
|
||||||
ExecContext *xc;
|
ExecContext *xc;
|
||||||
|
|
||||||
// If this is a store conditional, act appropriately
|
// If this is a store conditional, act appropriately
|
||||||
if (req->flags & LOCKED) {
|
if (req->isLocked()) {
|
||||||
xc = req->xc;
|
xc = req->xc;
|
||||||
|
|
||||||
if (req->flags & UNCACHEABLE) {
|
if (req->isUncacheable()) {
|
||||||
// Don't update result register (see stq_c in isa_desc)
|
// Don't update result register (see stq_c in isa_desc)
|
||||||
req->result = 2;
|
req->result = 2;
|
||||||
xc->setStCondFailures(0);//Needed? [RGD]
|
xc->setStCondFailures(0);//Needed? [RGD]
|
||||||
|
|
6
src/mem/cache/cache_impl.hh
vendored
6
src/mem/cache/cache_impl.hh
vendored
|
@ -60,7 +60,7 @@ doTimingAccess(Packet *pkt, CachePort *cachePort, bool isCpuSide)
|
||||||
{
|
{
|
||||||
if (isCpuSide)
|
if (isCpuSide)
|
||||||
{
|
{
|
||||||
if (pkt->isWrite() && (pkt->req->getFlags() & LOCKED)) {
|
if (pkt->isWrite() && (pkt->req->isLocked())) {
|
||||||
pkt->req->setScResult(1);
|
pkt->req->setScResult(1);
|
||||||
}
|
}
|
||||||
if (!(pkt->flags & SATISFIED)) {
|
if (!(pkt->flags & SATISFIED)) {
|
||||||
|
@ -95,7 +95,7 @@ doAtomicAccess(Packet *pkt, bool isCpuSide)
|
||||||
if (isCpuSide)
|
if (isCpuSide)
|
||||||
{
|
{
|
||||||
//Temporary solution to LL/SC
|
//Temporary solution to LL/SC
|
||||||
if (pkt->isWrite() && (pkt->req->getFlags() & LOCKED)) {
|
if (pkt->isWrite() && (pkt->req->isLocked())) {
|
||||||
pkt->req->setScResult(1);
|
pkt->req->setScResult(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ doFunctionalAccess(Packet *pkt, bool isCpuSide)
|
||||||
pkt->req->setThreadContext(0,0);
|
pkt->req->setThreadContext(0,0);
|
||||||
|
|
||||||
//Temporary solution to LL/SC
|
//Temporary solution to LL/SC
|
||||||
if (pkt->isWrite() && (pkt->req->getFlags() & LOCKED)) {
|
if (pkt->isWrite() && (pkt->req->isLocked())) {
|
||||||
assert("Can't handle LL/SC on functional path\n");
|
assert("Can't handle LL/SC on functional path\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue