diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-08-21 07:03:27 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-08-21 07:03:27 -0400 |
commit | daaae3744d119de836d5260205dd34990e741608 (patch) | |
tree | c579bdc50bad2bc3622d503170b987b046889bd9 /src/cpu | |
parent | 6eb434c8a227cdc30b459b2b96cb4354e3312554 (diff) | |
download | gem5-daaae3744d119de836d5260205dd34990e741608.tar.xz |
mem: Reflect that packet address and size are always valid
This patch simplifies the packet, and removes the possibility of
creating a packet without a valid address and/or size. Under no
circumstances are these fields set at a later point, and thus they
really have to be provided at construction time.
The patch also fixes a case there the MinorCPU creates a packet
without a valid address and size, only to later delete it.
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/minor/lsq.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/minor/lsq.cc b/src/cpu/minor/lsq.cc index db57daa37..376e8a0ff 100644 --- a/src/cpu/minor/lsq.cc +++ b/src/cpu/minor/lsq.cc @@ -1578,6 +1578,12 @@ LSQ::LSQRequest::makePacket() if (packet) return; + // if the translation faulted, do not create a packet + if (fault != NoFault) { + assert(packet == NULL); + return; + } + packet = makePacketForRequest(request, isLoad, this, data); /* Null the ret data so we know not to deallocate it when the * ret is destroyed. The data now belongs to the ret and |