summaryrefslogtreecommitdiff
path: root/src/cpu/simple/atomic.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-10-18 13:15:08 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-10-18 13:15:08 -0400
commit8351660273980196269ae14165ae7158c6ffc392 (patch)
treeb77809945e04e5a23abb3bf676eff20437345216 /src/cpu/simple/atomic.cc
parent6010f350a48c9d8f049fd82d27c188ed1ebe77ed (diff)
downloadgem5-8351660273980196269ae14165ae7158c6ffc392.tar.xz
CPU: Use the ThreadContext cpu id instead of the params cpu id in all cases.
--HG-- extra : convert_revision : 6d025764682181b1f67df3b1d8d1d59099136df7
Diffstat (limited to 'src/cpu/simple/atomic.cc')
-rw-r--r--src/cpu/simple/atomic.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index 525bcbd22..9f574e8be 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -159,9 +159,9 @@ AtomicSimpleCPU::AtomicSimpleCPU(Params *p)
icachePort.snoopRangeSent = false;
dcachePort.snoopRangeSent = false;
- ifetch_req.setThreadContext(p->cpu_id, 0); // Add thread ID if we add MT
- data_read_req.setThreadContext(p->cpu_id, 0); // Add thread ID here too
- data_write_req.setThreadContext(p->cpu_id, 0); // Add thread ID here too
+ ifetch_req.setThreadContext(cpuId, 0); // Add thread ID if we add MT
+ data_read_req.setThreadContext(cpuId, 0); // Add thread ID here too
+ data_write_req.setThreadContext(cpuId, 0); // Add thread ID here too
}
@@ -237,6 +237,8 @@ AtomicSimpleCPU::takeOverFrom(BaseCPU *oldCPU)
if (_status != Running) {
_status = Idle;
}
+ assert(threadContexts.size() == 1);
+ cpuId = tc->readCpuId();
}