arch-arm: Remove dead doingStage2 variable in PT walker

Change-Id: Iab5ecec56120c725847b2e462fd4793cfac87d3c
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10815
This commit is contained in:
Andreas Sandberg
2018-06-05 17:55:53 +01:00
parent 525ce650e1
commit 60600f09c2
2 changed files with 17 additions and 36 deletions

View File

@@ -132,7 +132,7 @@ TableWalker::WalkerState::WalkerState() :
asid(0), vmid(0), isHyp(false), transState(nullptr),
vaddr(0), vaddr_tainted(0), isWrite(false), isFetch(false), isSecure(false),
secureLookup(false), rwTable(false), userTable(false), xnTable(false),
pxnTable(false), stage2Req(false), doingStage2(false),
pxnTable(false), stage2Req(false),
stage2Tran(nullptr), timing(false), functional(false),
mode(BaseTLB::Read), tranType(TLB::NormalTran), l2Desc(l1Desc),
delayed(false), tableWalker(nullptr)
@@ -302,11 +302,6 @@ TableWalker::walk(RequestPtr _req, ThreadContext *_tc, uint16_t _asid,
statRequestOrigin[REQUESTED][currState->isFetch]++;
// We only do a second stage of translation if we're not secure, or in
// hyp mode, the second stage MMU is enabled, and this table walker
// instance is the first stage.
// TODO: fix setting of doingStage2 for timing mode
currState->doingStage2 = false;
currState->stage2Req = _stage2Req && !isStage2;
bool long_desc_format = currState->aarch64 || _isHyp || isStage2 ||
@@ -1817,13 +1812,11 @@ TableWalker::doL1DescriptorWrapper()
else if (!currState->delayed) {
// delay is not set so there is no L2 to do
// Don't finish the translation if a stage 2 look up is underway
if (!currState->doingStage2) {
statWalkServiceTime.sample(curTick() - currState->startTime);
DPRINTF(TLBVerbose, "calling translateTiming again\n");
tlb->translateTiming(currState->req, currState->tc,
currState->transState, currState->mode);
statWalksShortTerminatedAtLevel[0]++;
}
statWalkServiceTime.sample(curTick() - currState->startTime);
DPRINTF(TLBVerbose, "calling translateTiming again\n");
tlb->translateTiming(currState->req, currState->tc,
currState->transState, currState->mode);
statWalksShortTerminatedAtLevel[0]++;
pending = false;
nextWalk(currState->tc);
@@ -1859,16 +1852,12 @@ TableWalker::doL2DescriptorWrapper()
currState->transState->finish(currState->fault, currState->req,
currState->tc, currState->mode);
statWalksShortTerminatedAtLevel[1]++;
}
else {
// Don't finish the translation if a stage 2 look up is underway
if (!currState->doingStage2) {
statWalkServiceTime.sample(curTick() - currState->startTime);
DPRINTF(TLBVerbose, "calling translateTiming again\n");
tlb->translateTiming(currState->req, currState->tc,
currState->transState, currState->mode);
statWalksShortTerminatedAtLevel[1]++;
}
} else {
statWalkServiceTime.sample(curTick() - currState->startTime);
DPRINTF(TLBVerbose, "calling translateTiming again\n");
tlb->translateTiming(currState->req, currState->tc,
currState->transState, currState->mode);
statWalksShortTerminatedAtLevel[1]++;
}
@@ -1941,14 +1930,11 @@ TableWalker::doLongDescriptorWrapper(LookupLevel curr_lookup_level)
delete currState;
} else if (!currState->delayed) {
// No additional lookups required
// Don't finish the translation if a stage 2 look up is underway
if (!currState->doingStage2) {
DPRINTF(TLBVerbose, "calling translateTiming again\n");
statWalkServiceTime.sample(curTick() - currState->startTime);
tlb->translateTiming(currState->req, currState->tc,
currState->transState, currState->mode);
statWalksLongTerminatedAtLevel[(unsigned) curr_lookup_level]++;
}
DPRINTF(TLBVerbose, "calling translateTiming again\n");
statWalkServiceTime.sample(curTick() - currState->startTime);
tlb->translateTiming(currState->req, currState->tc,
currState->transState, currState->mode);
statWalksLongTerminatedAtLevel[(unsigned) curr_lookup_level]++;
pending = false;
nextWalk(currState->tc);

View File

@@ -761,11 +761,6 @@ class TableWalker : public MemObject
/** Flag indicating if a second stage of lookup is required */
bool stage2Req;
/** Indicates whether the translation has been passed onto the second
* stage mmu, and no more work is required from the first stage.
*/
bool doingStage2;
/** A pointer to the stage 2 translation that's in progress */
TLB::Translation *stage2Tran;