summaryrefslogtreecommitdiff
path: root/src/cpu/minor
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2015-09-30 11:14:19 -0500
committerMitch Hayenga <mitch.hayenga@arm.com>2015-09-30 11:14:19 -0500
commit9e07a7504c94973e7837d1d3e96dbdb8d95cfad3 (patch)
tree7f845430119da24bcb4405df3a1c2102f6b7b534 /src/cpu/minor
parenta5c4eb3de9deb3a71a6a5230a25ff5962e584980 (diff)
downloadgem5-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/minor')
-rw-r--r--src/cpu/minor/cpu.cc13
-rw-r--r--src/cpu/minor/cpu.hh2
2 files changed, 7 insertions, 8 deletions
diff --git a/src/cpu/minor/cpu.cc b/src/cpu/minor/cpu.cc
index 51a3f3ae8..cd39a8b93 100644
--- a/src/cpu/minor/cpu.cc
+++ b/src/cpu/minor/cpu.cc
@@ -167,14 +167,12 @@ MinorCPU::dbg_vtophys(Addr addr)
}
void
-MinorCPU::wakeup()
+MinorCPU::wakeup(ThreadID tid)
{
- DPRINTF(Drain, "MinorCPU wakeup\n");
+ DPRINTF(Drain, "[tid:%d] MinorCPU wakeup\n", tid);
- for (auto i = threads.begin(); i != threads.end(); i ++) {
- if ((*i)->status() == ThreadContext::Suspended)
- (*i)->activate();
- }
+ if (threads[tid]->status() == ThreadContext::Suspended)
+ threads[tid]->activate();
DPRINTF(Drain,"Suspended Processor awoke\n");
}
@@ -241,7 +239,8 @@ MinorCPU::drainResume()
"'timing' mode.\n");
}
- wakeup();
+ for (ThreadID tid = 0; tid < numThreads; tid++)
+ wakeup(tid);
pipeline->drainResume();
}
diff --git a/src/cpu/minor/cpu.hh b/src/cpu/minor/cpu.hh
index 2e877d786..99b915693 100644
--- a/src/cpu/minor/cpu.hh
+++ b/src/cpu/minor/cpu.hh
@@ -128,7 +128,7 @@ class MinorCPU : public BaseCPU
/** Starting, waking and initialisation */
void init();
void startup();
- void wakeup();
+ void wakeup(ThreadID tid) M5_ATTR_OVERRIDE;
Addr dbg_vtophys(Addr addr);