From e1ac9629398027186ef4c2a66772aeff2b4c6792 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Wed, 3 Sep 2014 07:42:21 -0400 Subject: arch: Cleanup unused ISA traits constants This patch prunes unused values, and also unifies how the values are defined (not using an enum for ALPHA), aligning the use of int vs Addr etc. The patch also removes the duplication of PageBytes/PageShift and VMPageSize/LogVMPageSize. For all ISAs the two pairs had identical values and the latter has been removed. --- src/mem/se_translating_port_proxy.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mem/se_translating_port_proxy.cc') diff --git a/src/mem/se_translating_port_proxy.cc b/src/mem/se_translating_port_proxy.cc index 1060a3270..ef9ce5850 100644 --- a/src/mem/se_translating_port_proxy.cc +++ b/src/mem/se_translating_port_proxy.cc @@ -68,7 +68,7 @@ SETranslatingPortProxy::tryReadBlob(Addr addr, uint8_t *p, int size) const { int prevSize = 0; - for (ChunkGenerator gen(addr, size, VMPageSize); !gen.done(); gen.next()) { + for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) { Addr paddr; if (!pTable->translate(gen.addr(),paddr)) @@ -94,13 +94,13 @@ SETranslatingPortProxy::tryWriteBlob(Addr addr, uint8_t *p, int size) const { int prevSize = 0; - for (ChunkGenerator gen(addr, size, VMPageSize); !gen.done(); gen.next()) { + for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) { Addr paddr; if (!pTable->translate(gen.addr(), paddr)) { if (allocating == Always) { - process->allocateMem(roundDown(gen.addr(), VMPageSize), - VMPageSize); + process->allocateMem(roundDown(gen.addr(), PageBytes), + PageBytes); } else if (allocating == NextPage) { // check if we've accessed the next page on the stack if (!process->fixupStackFault(gen.addr())) @@ -130,13 +130,13 @@ SETranslatingPortProxy::writeBlob(Addr addr, uint8_t *p, int size) const bool SETranslatingPortProxy::tryMemsetBlob(Addr addr, uint8_t val, int size) const { - for (ChunkGenerator gen(addr, size, VMPageSize); !gen.done(); gen.next()) { + for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) { Addr paddr; if (!pTable->translate(gen.addr(), paddr)) { if (allocating == Always) { - process->allocateMem(roundDown(gen.addr(), VMPageSize), - VMPageSize); + process->allocateMem(roundDown(gen.addr(), PageBytes), + PageBytes); pTable->translate(gen.addr(), paddr); } else { return false; -- cgit v1.2.3