summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/base.hh3
-rw-r--r--src/cpu/inorder/inorder_dyn_inst.cc6
-rw-r--r--src/cpu/inorder/inorder_dyn_inst.hh7
-rw-r--r--src/cpu/inorder/thread_context.hh3
-rw-r--r--src/cpu/o3/cpu.cc16
-rw-r--r--src/cpu/o3/cpu.hh5
-rw-r--r--src/cpu/simple/base.cc8
-rw-r--r--src/cpu/simple/base.hh1
8 files changed, 5 insertions, 44 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index ac3d1d892..a124b4282 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -257,9 +257,6 @@ class BaseCPU : public MemObject
/// Notify the CPU that the indicated context is now suspended.
virtual void suspendContext(ThreadID thread_num) {}
- /// Notify the CPU that the indicated context is now deallocated.
- virtual void deallocateContext(ThreadID thread_num) {}
-
/// Notify the CPU that the indicated context is now halted.
virtual void haltContext(ThreadID thread_num) {}
diff --git a/src/cpu/inorder/inorder_dyn_inst.cc b/src/cpu/inorder/inorder_dyn_inst.cc
index 08f583338..adde35fdf 100644
--- a/src/cpu/inorder/inorder_dyn_inst.cc
+++ b/src/cpu/inorder/inorder_dyn_inst.cc
@@ -571,12 +571,6 @@ InOrderDynInst::setRegOtherThread(int reg_idx, MiscReg val, ThreadID tid)
}
}
-void
-InOrderDynInst::deallocateContext(int thread_num)
-{
- this->cpu->deallocateContext(thread_num);
-}
-
Fault
InOrderDynInst::readMem(Addr addr, uint8_t *data,
unsigned size, unsigned flags)
diff --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh
index 7558df7d1..053a72d1d 100644
--- a/src/cpu/inorder/inorder_dyn_inst.hh
+++ b/src/cpu/inorder/inorder_dyn_inst.hh
@@ -533,13 +533,6 @@ class InOrderDynInst : public ExecContext, public RefCounted
////////////////////////////////////////////////////////////
//
- // MULTITHREADING INTERFACE TO CPU MODELS
- //
- ////////////////////////////////////////////////////////////
- virtual void deallocateContext(int thread_num);
-
- ////////////////////////////////////////////////////////////
- //
// PROGRAM COUNTERS - PC/NPC/NPC
//
////////////////////////////////////////////////////////////
diff --git a/src/cpu/inorder/thread_context.hh b/src/cpu/inorder/thread_context.hh
index e29b8f273..7b1dc833f 100644
--- a/src/cpu/inorder/thread_context.hh
+++ b/src/cpu/inorder/thread_context.hh
@@ -281,9 +281,6 @@ class InOrderThreadContext : public ThreadContext
void activateContext()
{ cpu->activateContext(thread->threadId()); }
- void deallocateContext()
- { cpu->deallocateContext(thread->threadId()); }
-
/** Returns the number of consecutive store conditional failures. */
// @todo: Figure out where these store cond failures should go.
unsigned readStCondFailures()
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 2ae185532..7ed3944cf 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -730,20 +730,12 @@ FullO3CPU<Impl>::activateContext(ThreadID tid)
template <class Impl>
void
-FullO3CPU<Impl>::deallocateContext(ThreadID tid, bool remove)
-{
- deactivateThread(tid);
- if (remove)
- removeThread(tid);
-}
-
-template <class Impl>
-void
FullO3CPU<Impl>::suspendContext(ThreadID tid)
{
DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid);
assert(!switchedOut());
- deallocateContext(tid, false);
+
+ deactivateThread(tid);
// If this was the last thread then unschedule the tick event.
if (activeThreads.size() == 0)
@@ -761,7 +753,9 @@ FullO3CPU<Impl>::haltContext(ThreadID tid)
//For now, this is the same as deallocate
DPRINTF(O3CPU,"[tid:%i]: Halt Context called. Deallocating", tid);
assert(!switchedOut());
- deallocateContext(tid, true);
+
+ deactivateThread(tid);
+ removeThread(tid);
}
template <class Impl>
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index 0fd08a68b..c263790ce 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -326,11 +326,6 @@ class FullO3CPU : public BaseO3CPU
void suspendContext(ThreadID tid);
/** Remove Thread from Active Threads List &&
- * Possibly Remove Thread Context from CPU.
- */
- void deallocateContext(ThreadID tid, bool remove);
-
- /** Remove Thread from Active Threads List &&
* Remove Thread Context from CPU.
*/
void haltContext(ThreadID tid);
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 5130e2960..6101ff30f 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -133,14 +133,6 @@ BaseSimpleCPU::~BaseSimpleCPU()
}
void
-BaseSimpleCPU::deallocateContext(ThreadID thread_num)
-{
- // for now, these are equivalent
- suspendContext(thread_num);
-}
-
-
-void
BaseSimpleCPU::haltContext(ThreadID thread_num)
{
// for now, these are equivalent
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index 43d96fbeb..8f38a33c8 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -170,7 +170,6 @@ class BaseSimpleCPU : public BaseCPU, public ExecContext
void postExecute();
void advancePC(const Fault &fault);
- virtual void deallocateContext(ThreadID thread_num);
virtual void haltContext(ThreadID thread_num);
// statistics