From cc6523e2d686447f90acccac20c0fb2940dc3e3b Mon Sep 17 00:00:00 2001 From: Mitch Hayenga Date: Sat, 20 Sep 2014 17:18:36 -0400 Subject: cpu: Remove unused deallocateContext calls The call paths for de-scheduling a thread are halt() and suspend(), from the thread context. There is no call to deallocateContext() in general, though some CPUs chose to define it. This patch removes the function from BaseCPU and the cores which do not require it. --- src/cpu/inorder/inorder_dyn_inst.cc | 6 ------ src/cpu/inorder/inorder_dyn_inst.hh | 7 ------- src/cpu/inorder/thread_context.hh | 3 --- 3 files changed, 16 deletions(-) (limited to 'src/cpu/inorder') 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 @@ -531,13 +531,6 @@ class InOrderDynInst : public ExecContext, public RefCounted /** Emulates a syscall. */ void syscall(int64_t callnum); - //////////////////////////////////////////////////////////// - // - // 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() -- cgit v1.2.3