From 1c34ee20dfbbd557e394d61825232b10c0f3d37f Mon Sep 17 00:00:00 2001 From: Akash Bagdia Date: Tue, 9 Dec 2014 10:42:08 +0000 Subject: power: Low-power idle power state for idle CPUs Add functionality to the BaseCPU that will put the entire CPU into a low-power idle state whenever all threads in it are idle. --- src/cpu/simple/atomic.cc | 3 +++ src/cpu/simple/timing.cc | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'src/cpu/simple') diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index f3e14d401..3cd6c1666 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -247,6 +247,8 @@ AtomicSimpleCPU::activateContext(ThreadID thread_num) == activeThreads.end()) { activeThreads.push_back(thread_num); } + + BaseCPU::activateContext(thread_num); } @@ -273,6 +275,7 @@ AtomicSimpleCPU::suspendContext(ThreadID thread_num) } } + BaseCPU::suspendContext(thread_num); } diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 43f4eb9f4..c99f9c475 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -218,6 +218,8 @@ TimingSimpleCPU::activateContext(ThreadID thread_num) == activeThreads.end()) { activeThreads.push_back(thread_num); } + + BaseCPU::activateContext(thread_num); } @@ -243,6 +245,8 @@ TimingSimpleCPU::suspendContext(ThreadID thread_num) deschedule(fetchEvent); } } + + BaseCPU::suspendContext(thread_num); } bool -- cgit v1.2.3