diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2019-01-22 17:40:17 +0000 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2019-02-26 11:17:58 +0000 |
commit | 8e723650586e9d902d4b462ddf5bb067e5eb0757 (patch) | |
tree | 0b8d6d3ff2cd160cc16ba470599eb7211d36daf5 /src/mem/packet.cc | |
parent | 32bbddf2362421021b016d995f5e27b2bceea3a2 (diff) | |
download | gem5-8e723650586e9d902d4b462ddf5bb067e5eb0757.tar.xz |
mem-cache: Copy over flags to forwarded response
A cache that forwards a request to the memory below does not fill and
forwards the response with the data to cache above. This change
ensures that the flags of the original response are also preserved.
Change-Id: I244b20b073c31b976358816c5b14bba413b8271f
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/16182
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Diffstat (limited to 'src/mem/packet.cc')
-rw-r--r-- | src/mem/packet.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mem/packet.cc b/src/mem/packet.cc index 4369e168f..e1c760cd0 100644 --- a/src/mem/packet.cc +++ b/src/mem/packet.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 ARM Limited + * Copyright (c) 2011-2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -303,6 +303,16 @@ Packet::trySatisfyFunctional(Printable *obj, Addr addr, bool is_secure, int size } void +Packet::copyResponderFlags(const PacketPtr pkt) +{ + assert(isRequest()); + // If we have already found a responder, no other cache should + // commit to responding + assert(!pkt->cacheResponding() || !cacheResponding()); + flags.set(pkt->flags & RESPONDER_FLAGS); +} + +void Packet::pushSenderState(Packet::SenderState *sender_state) { assert(sender_state != NULL); |