diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-01-22 05:00:53 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-01-22 05:00:53 -0500 |
commit | f49830ce0ba79c54c65c9c4b25bc3c6184aaf2a9 (patch) | |
tree | 00b2f9f0131ef65a411c9fd81339caecfc946b47 /src/cpu/kvm/base.cc | |
parent | be3a952394e1f337d1c372448ee099203336181a (diff) | |
download | gem5-f49830ce0ba79c54c65c9c4b25bc3c6184aaf2a9.tar.xz |
mem: Clean up Request initialisation
This patch tidies up how we create and set the fields of a Request. In
essence it tries to use the constructor where possible (as opposed to
setPhys and setVirt), thus avoiding spreading the information across a
number of locations. In fact, setPhys is made private as part of this
patch, and a number of places where we callede setVirt instead uses
the appropriate constructor.
Diffstat (limited to 'src/cpu/kvm/base.cc')
-rw-r--r-- | src/cpu/kvm/base.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index 95d91467e..e09c4b7f2 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -118,8 +118,6 @@ BaseKvmCPU::init() // initialize CPU, including PC if (FullSystem && !switchedOut()) TheISA::initCPU(tc, tc->contextId()); - - mmio_req.setThreadContext(tc->contextId(), 0); } void @@ -995,7 +993,8 @@ BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write) ThreadContext *tc(thread->getTC()); syncThreadContext(); - mmio_req.setPhys(paddr, size, Request::UNCACHEABLE, dataMasterId()); + Request mmio_req(paddr, size, Request::UNCACHEABLE, dataMasterId()); + mmio_req.setThreadContext(tc->contextId(), 0); // Some architectures do need to massage physical addresses a bit // before they are inserted into the memory system. This enables // APIC accesses on x86 and m5ops where supported through a MMIO |