From: Dylan Johnson Date: Tue, 2 Aug 2016 09:38:02 +0000 (+0100) Subject: arm: Refactor aarch64 table walk logic to remove redundancy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eac27759e77edfcb772021be714469f43f2e3b46;p=gem5.git arm: Refactor aarch64 table walk logic to remove redundancy The functional case is already handled within the fetchDescriptor() function. We can thus use that function for both atomic and functional mode when we start the table walk. Change-Id: Iacaed28cd9024d259fd37a58150efd00ff94d86e --- diff --git a/src/arch/arm/table_walker.cc b/src/arch/arm/table_walker.cc index 4eb57c59a..f1a7ca250 100644 --- a/src/arch/arm/table_walker.cc +++ b/src/arch/arm/table_walker.cc @@ -992,21 +992,11 @@ TableWalker::processWalkAArch64() stateQueues[start_lookup_level].size()); stateQueues[start_lookup_level].push_back(currState); currState = NULL; - } else if (!currState->functional) { + } else { fetchDescriptor(desc_addr, (uint8_t*)&currState->longDesc.data, sizeof(uint64_t), flag, -1, NULL, &TableWalker::doLongDescriptor); f = currState->fault; - } else { - RequestPtr req = new Request(desc_addr, sizeof(uint64_t), flag, - masterId); - PacketPtr pkt = new Packet(req, MemCmd::ReadReq); - pkt->dataStatic((uint8_t*) &currState->longDesc.data); - port->sendFunctional(pkt); - doLongDescriptor(); - delete req; - delete pkt; - f = currState->fault; } return f;