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/sim/process.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sim/process.cc') diff --git a/src/sim/process.cc b/src/sim/process.cc index a738908e1..2ca1f1531 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -334,7 +334,7 @@ Process::sim_fd_obj(int tgt_fd) void Process::allocateMem(Addr vaddr, int64_t size, bool clobber) { - int npages = divCeil(size, (int64_t)VMPageSize); + int npages = divCeil(size, (int64_t)PageBytes); Addr paddr = system->allocPhysPages(npages); pTable->map(vaddr, paddr, size, clobber); } @@ -345,7 +345,7 @@ Process::fixupStackFault(Addr vaddr) // Check if this is already on the stack and there's just no page there // yet. if (vaddr >= stack_min && vaddr < stack_base) { - allocateMem(roundDown(vaddr, VMPageSize), VMPageSize); + allocateMem(roundDown(vaddr, PageBytes), PageBytes); return true; } -- cgit v1.2.3