diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-08-22 11:39:59 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-08-22 11:39:59 -0400 |
commit | c60db56741631b03e3431d03c26c9114c27ba6c6 (patch) | |
tree | 646cb63e6a355ca2e61569c7e8ce150b7776f12e /src/arch/x86 | |
parent | a6074016e211276e47238d0d708288527ace0aef (diff) | |
download | gem5-c60db56741631b03e3431d03c26c9114c27ba6c6.tar.xz |
Packet: Remove NACKs from packet and its use in endpoints
This patch removes the NACK frrom the packet as there is no longer any
module in the system that issues them (the bridge was the only one and
the previous patch removes that).
The handling of NACKs was mostly avoided throughout the code base, by
using e.g. panic or assert false, but in a few locations the NACKs
were actually dealt with (although NACKs never occured in any of the
regressions). Most notably, the DMA port will now never receive a NACK
and the backoff time is thus never changed. As a consequence, the
entire backoff mechanism (similar to a PCI bus) is now removed and the
DMA port entirely relies on the bus performing the arbitration and
issuing a retry when appropriate. This is more in line with e.g. PCIe.
Surprisingly, this patch has no impact on any of the regressions. As
mentioned in the patch that removes the NACK from the bridge, a
follow-up patch should change the request and response buffer size for
at least one regression to also verify that the system behaves as
expected when the bridge fills up.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/pagetable_walker.cc | 92 |
1 files changed, 39 insertions, 53 deletions
diff --git a/src/arch/x86/pagetable_walker.cc b/src/arch/x86/pagetable_walker.cc index b6e6c33f4..46d608ace 100644 --- a/src/arch/x86/pagetable_walker.cc +++ b/src/arch/x86/pagetable_walker.cc @@ -570,63 +570,49 @@ bool Walker::WalkerState::recvPacket(PacketPtr pkt) { assert(pkt->isResponse()); - if (!pkt->wasNacked()) { - assert(inflight); - assert(state == Waiting); - assert(!read); - inflight--; - if (pkt->isRead()) { - state = nextState; - nextState = Ready; - PacketPtr write = NULL; - read = pkt; - timingFault = stepWalk(write); - state = Waiting; - assert(timingFault == NoFault || read == NULL); - if (write) { - writes.push_back(write); - } - sendPackets(); - } else { - sendPackets(); - } - if (inflight == 0 && read == NULL && writes.size() == 0) { - state = Ready; - nextState = Waiting; - if (timingFault == NoFault) { - /* - * Finish the translation. Now that we now the right entry is - * in the TLB, this should work with no memory accesses. - * There could be new faults unrelated to the table walk like - * permissions violations, so we'll need the return value as - * well. - */ - bool delayedResponse; - Fault fault = walker->tlb->translate(req, tc, NULL, mode, - delayedResponse, true); - assert(!delayedResponse); - // Let the CPU continue. - translation->finish(fault, req, tc, mode); - } else { - // There was a fault during the walk. Let the CPU know. - translation->finish(timingFault, req, tc, mode); - } - return true; + assert(inflight); + assert(state == Waiting); + assert(!read); + inflight--; + if (pkt->isRead()) { + state = nextState; + nextState = Ready; + PacketPtr write = NULL; + read = pkt; + timingFault = stepWalk(write); + state = Waiting; + assert(timingFault == NoFault || read == NULL); + if (write) { + writes.push_back(write); } + sendPackets(); } else { - DPRINTF(PageTableWalker, "Request was nacked. Entering retry state\n"); - pkt->reinitNacked(); - if (!walker->sendTiming(this, pkt)) { - inflight--; - retrying = true; - if (pkt->isWrite()) { - writes.push_back(pkt); - } else { - assert(!read); - read = pkt; - } + sendPackets(); + } + if (inflight == 0 && read == NULL && writes.size() == 0) { + state = Ready; + nextState = Waiting; + if (timingFault == NoFault) { + /* + * Finish the translation. Now that we now the right entry is + * in the TLB, this should work with no memory accesses. + * There could be new faults unrelated to the table walk like + * permissions violations, so we'll need the return value as + * well. + */ + bool delayedResponse; + Fault fault = walker->tlb->translate(req, tc, NULL, mode, + delayedResponse, true); + assert(!delayedResponse); + // Let the CPU continue. + translation->finish(fault, req, tc, mode); + } else { + // There was a fault during the walk. Let the CPU know. + translation->finish(timingFault, req, tc, mode); } + return true; } + return false; } |