diff options
author | Curtis Dunham <Curtis.Dunham@arm.com> | 2014-10-29 23:18:24 -0500 |
---|---|---|
committer | Curtis Dunham <Curtis.Dunham@arm.com> | 2014-10-29 23:18:24 -0500 |
commit | 46f9f11a5575a0ec8a69a1c0181b37668de65152 (patch) | |
tree | a8e093ee4c180b1f61099ce0487076fc6ea374ef /src/mem/cache/mshr.hh | |
parent | 8b7724d04c8bd337c096ac4364beceac6a64cde2 (diff) | |
download | gem5-46f9f11a5575a0ec8a69a1c0181b37668de65152.tar.xz |
mem: have WriteInvalidate obsolete MSHRs
Since WriteInvalidate directly writes into the cache, it can
create tricky timing interleavings with reads and writes to the
same cache line that haven't yet completed. This patch ensures
that these requests, when completed, don't overwrite the newer
data from the WriteInvalidate.
Diffstat (limited to 'src/mem/cache/mshr.hh')
-rw-r--r-- | src/mem/cache/mshr.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh index 65357b9e6..9ea9cfb2c 100644 --- a/src/mem/cache/mshr.hh +++ b/src/mem/cache/mshr.hh @@ -89,6 +89,9 @@ class MSHR : public Packet::SenderState, public Printable /** Did we snoop a read while waiting for data? */ bool postDowngrade; + /** Did we get WriteInvalidate'd (and therefore obsoleted)? */ + bool _isObsolete; + public: class Target { @@ -214,6 +217,8 @@ class MSHR : public Packet::SenderState, public Printable bool isUncacheable() const { return _isUncacheable; } + bool isObsolete() const { return _isObsolete; } + /** * Allocate a miss to this MSHR. * @param cmd The requesting command. @@ -289,6 +294,12 @@ class MSHR : public Packet::SenderState, public Printable bool checkFunctional(PacketPtr pkt); + /** Mark this MSHR as tracking a transaction with obsoleted data. It still + * needs to complete its lifecycle, but should not modify the cache. */ + void markObsolete() { + _isObsolete = true; + } + /** * Prints the contents of this MSHR for debugging. */ |