1/* 2 * Copyright 2014 Google, Inc. |
3 * Copyright (c) 2012-2013,2015,2017 ARM Limited |
4 * All rights reserved. 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating 9 * to a hardware implementation of the functionality of the software 10 * licensed hereunder. You may use the software subject to the license 11 * terms below provided that you ensure that this notice is replicated --- 84 unchanged lines hidden (view full) --- 96 if (tickEvent.scheduled()) { 97 deschedule(tickEvent); 98 } 99} 100 101DrainState 102AtomicSimpleCPU::drain() 103{ |
104 // Deschedule any power gating event (if any) 105 deschedulePowerGatingEvent(); 106 |
107 if (switchedOut()) 108 return DrainState::Drained; 109 110 if (!isDrained()) { 111 DPRINTF(Drain, "Requesting drain.\n"); 112 return DrainState::Draining; 113 } else { 114 if (tickEvent.scheduled()) --- 46 unchanged lines hidden (view full) --- 161 // Tick if any threads active 162 if (!tickEvent.scheduled()) { 163 schedule(tickEvent, nextCycle()); 164 } 165 } else { 166 threadInfo[tid]->notIdleFraction = 0; 167 } 168 } |
169 170 // Reschedule any power gating event (if any) 171 schedulePowerGatingEvent(); |
172} 173 174bool 175AtomicSimpleCPU::tryCompleteDrain() 176{ 177 if (drainState() != DrainState::Draining) 178 return false; 179 --- 525 unchanged lines hidden --- |