summaryrefslogtreecommitdiff
path: root/src/mem/addr_mapper.cc
diff options
context:
space:
mode:
authorChristoph Pfister <pfistchr@student.ethz.ch>2015-05-30 13:45:17 +0200
committerChristoph Pfister <pfistchr@student.ethz.ch>2015-05-30 13:45:17 +0200
commit4a174947083b59cd76561ec0c41f23a95697b822 (patch)
treea9c133897d630aabad1ab4ecb1b4eef4196879de /src/mem/addr_mapper.cc
parent31825bd988fd512d822ee73a76d852c98fdf803d (diff)
downloadgem5-4a174947083b59cd76561ec0c41f23a95697b822.tar.xz
mem: addr_mapper: restore old address if request not sent
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/mem/addr_mapper.cc')
-rw-r--r--src/mem/addr_mapper.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mem/addr_mapper.cc b/src/mem/addr_mapper.cc
index 06237745b..2f0020576 100644
--- a/src/mem/addr_mapper.cc
+++ b/src/mem/addr_mapper.cc
@@ -128,9 +128,13 @@ AddrMapper::recvTimingReq(PacketPtr pkt)
// packets)
bool successful = masterPort.sendTimingReq(pkt);
- // If not successful, restore the sender state
- if (!successful && needsResponse) {
- delete pkt->popSenderState();
+ // If not successful, restore the address and sender state
+ if (!successful) {
+ pkt->setAddr(orig_addr);
+
+ if (needsResponse) {
+ delete pkt->popSenderState();
+ }
}
return successful;