diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2015-09-30 11:14:19 -0500 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2015-09-30 11:14:19 -0500 |
commit | fafa83ed32933fe250d34dfca23fba348429b176 (patch) | |
tree | 3bf8fd636f1e879273045fefda3b5d7319a38479 /src/cpu/minor | |
parent | 582a0148b441fe9f4a6f977094c5ce6bf7ab6313 (diff) | |
download | gem5-fafa83ed32933fe250d34dfca23fba348429b176.tar.xz |
cpu: Add per-thread monitors
Adds per-thread address monitors to support FullSystem SMT.
Diffstat (limited to 'src/cpu/minor')
-rw-r--r-- | src/cpu/minor/exec_context.hh | 8 | ||||
-rw-r--r-- | src/cpu/minor/fetch1.cc | 3 | ||||
-rw-r--r-- | src/cpu/minor/lsq.cc | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/cpu/minor/exec_context.hh b/src/cpu/minor/exec_context.hh index 3e4ea5ea9..625d2b877 100644 --- a/src/cpu/minor/exec_context.hh +++ b/src/cpu/minor/exec_context.hh @@ -343,12 +343,12 @@ class ExecContext : public ::ExecContext public: // monitor/mwait funtions - void armMonitor(Addr address) { getCpuPtr()->armMonitor(address); } - bool mwait(PacketPtr pkt) { return getCpuPtr()->mwait(pkt); } + void armMonitor(Addr address) { getCpuPtr()->armMonitor(0, address); } + bool mwait(PacketPtr pkt) { return getCpuPtr()->mwait(0, pkt); } void mwaitAtomic(ThreadContext *tc) - { return getCpuPtr()->mwaitAtomic(tc, thread.dtb); } + { return getCpuPtr()->mwaitAtomic(0, tc, thread.dtb); } AddressMonitor *getAddrMonitor() - { return getCpuPtr()->getCpuAddrMonitor(); } + { return getCpuPtr()->getCpuAddrMonitor(0); } }; } diff --git a/src/cpu/minor/fetch1.cc b/src/cpu/minor/fetch1.cc index 81fc99d37..84aaf02f5 100644 --- a/src/cpu/minor/fetch1.cc +++ b/src/cpu/minor/fetch1.cc @@ -135,7 +135,8 @@ Fetch1::fetchLine() "%s addr: 0x%x pc: %s line_offset: %d request_size: %d\n", request_id, aligned_pc, pc, line_offset, request_size); - request->request.setThreadContext(cpu.cpuId(), /* thread id */ 0); + request->request.setThreadContext(cpu.threads[0]->getTC()->contextId(), + /* thread id */ 0); request->request.setVirt(0 /* asid */, aligned_pc, request_size, Request::INST_FETCH, cpu.instMasterId(), /* I've no idea why we need the PC, but give it */ diff --git a/src/cpu/minor/lsq.cc b/src/cpu/minor/lsq.cc index 376e8a0ff..e644951f8 100644 --- a/src/cpu/minor/lsq.cc +++ b/src/cpu/minor/lsq.cc @@ -1501,7 +1501,8 @@ LSQ::pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data, if (inst->traceData) inst->traceData->setMem(addr, size, flags); - request->request.setThreadContext(cpu.cpuId(), /* thread id */ 0); + int cid = cpu.threads[inst->id.threadId]->getTC()->contextId(); + request->request.setThreadContext(cid, /* thread id */ 0); request->request.setVirt(0 /* asid */, addr, size, flags, cpu.dataMasterId(), /* I've no idea why we need the PC, but give it */ |