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 | 9e07a7504c94973e7837d1d3e96dbdb8d95cfad3 (patch) | |
tree | 7f845430119da24bcb4405df3a1c2102f6b7b534 /src/cpu/o3 | |
parent | a5c4eb3de9deb3a71a6a5230a25ff5962e584980 (diff) | |
download | gem5-9e07a7504c94973e7837d1d3e96dbdb8d95cfad3.tar.xz |
cpu,isa,mem: Add per-thread wakeup logic
Changes wakeup functionality so that only specific threads on SMT
capable cpus are woken.
Diffstat (limited to 'src/cpu/o3')
-rw-r--r-- | src/cpu/o3/cpu.cc | 8 | ||||
-rw-r--r-- | src/cpu/o3/cpu.hh | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index d4ee5ffe7..c17b7a9dc 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -120,7 +120,7 @@ FullO3CPU<Impl>::DcachePort::recvTimingSnoopReq(PacketPtr pkt) { for (ThreadID tid = 0; tid < cpu->numThreads; tid++) { if (cpu->getCpuAddrMonitor(tid)->doMonitor(pkt)) { - cpu->wakeup(); + cpu->wakeup(tid); } } lsq->recvTimingSnoopReq(pkt); @@ -1633,15 +1633,15 @@ FullO3CPU<Impl>::wakeCPU() template <class Impl> void -FullO3CPU<Impl>::wakeup() +FullO3CPU<Impl>::wakeup(ThreadID tid) { - if (this->thread[0]->status() != ThreadContext::Suspended) + if (this->thread[tid]->status() != ThreadContext::Suspended) return; this->wakeCPU(); DPRINTF(Quiesce, "Suspended Processor woken\n"); - this->threadContexts[0]->activate(); + this->threadContexts[tid]->activate(); } template <class Impl> diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh index aa02ee2ea..bd9c44752 100644 --- a/src/cpu/o3/cpu.hh +++ b/src/cpu/o3/cpu.hh @@ -640,7 +640,7 @@ class FullO3CPU : public BaseO3CPU /** Wakes the CPU, rescheduling the CPU if it's not already active. */ void wakeCPU(); - virtual void wakeup(); + virtual void wakeup(ThreadID tid) M5_ATTR_OVERRIDE; /** Gets a free thread id. Use if thread ids change across system. */ ThreadID getFreeTid(); |