Atomic CPU: Respect the NO_ACCESS request flag.
authorGabe Black <gblack@eecs.umich.edu>
Sun, 23 Aug 2009 21:15:15 +0000 (14:15 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 23 Aug 2009 21:15:15 +0000 (14:15 -0700)
src/cpu/simple/atomic.cc

index bab4b8b51abcdc315cc11118ba85ba0356417ac5..83da618f8e5c7dfe0bcd2793589f5fcb13003cab 100644 (file)
@@ -324,7 +324,7 @@ AtomicSimpleCPU::read(Addr addr, T &data, unsigned flags)
         Fault fault = thread->dtb->translateAtomic(req, tc, BaseTLB::Read);
 
         // Now do the access.
-        if (fault == NoFault) {
+        if (fault == NoFault && !req->getFlags().isSet(Request::NO_ACCESS)) {
             Packet pkt = Packet(req,
                     req->isLLSC() ? MemCmd::LoadLockedReq : MemCmd::ReadReq,
                     Packet::Broadcast);
@@ -481,7 +481,7 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
                 }
             }
 
-            if (do_access) {
+            if (do_access && !req->getFlags().isSet(Request::NO_ACCESS)) {
                 Packet pkt = Packet(req, cmd, Packet::Broadcast);
                 pkt.dataStatic(dataPtr);