From: Nikos Nikoleris Date: Fri, 3 Mar 2017 16:52:45 +0000 (+0000) Subject: ruby: Don't set the block data when a store conditional fails X-Git-Tag: v19.0.0.0~2768 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=946b5aeede320c4cae1c365e8f5b549aadc468f7;p=gem5.git ruby: Don't set the block data when a store conditional fails Previously the Sequencer upon a Store Conditional would unconditionally set the data of the memory location. This change checks and prevents a failed Store Conditional from modifying any data. Change-Id: Id63c9579d8f054f0e95c6d338a7e31aa48762755 Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/2902 Reviewed-by: Jason Lowe-Power Reviewed-by: Bradford Beckmann Maintainer: Jason Lowe-Power --- diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index 7fdd52623..97afa5ec6 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -489,7 +489,9 @@ Sequencer::hitCallback(SequencerRequest* srequest, DataBlock& data, data.setData(&overwrite_val[0], getOffset(request_address), pkt->getSize()); DPRINTF(RubySequencer, "swap data %s\n", data); - } else { + } else if (type != RubyRequestType_Store_Conditional || llscSuccess) { + // Types of stores set the actual data here, apart from + // failed Store Conditional requests data.setData(pkt->getConstPtr(), getOffset(request_address), pkt->getSize()); DPRINTF(RubySequencer, "set data %s\n", data);