summaryrefslogtreecommitdiff
path: root/src/sim/process.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-09-03 07:42:21 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-09-03 07:42:21 -0400
commite1ac9629398027186ef4c2a66772aeff2b4c6792 (patch)
tree69a2591a576690aeafca28eef2374b20b76d7c3c /src/sim/process.cc
parent23c85407562c3e2e2f3e1ca8b8dcbdc38fac82df (diff)
downloadgem5-e1ac9629398027186ef4c2a66772aeff2b4c6792.tar.xz
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.
Diffstat (limited to 'src/sim/process.cc')
-rw-r--r--src/sim/process.cc4
1 files changed, 2 insertions, 2 deletions
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;
}