atomic.cc (12127:4207df055b0d) | atomic.cc (12276:22c220be30c5) |
---|---|
1/* 2 * Copyright 2014 Google, Inc. | 1/* 2 * Copyright 2014 Google, Inc. |
3 * Copyright (c) 2012-2013,2015 ARM Limited | 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{ | 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 |
|
104 if (switchedOut()) 105 return DrainState::Drained; 106 107 if (!isDrained()) { 108 DPRINTF(Drain, "Requesting drain.\n"); 109 return DrainState::Draining; 110 } else { 111 if (tickEvent.scheduled()) --- 46 unchanged lines hidden (view full) --- 158 // Tick if any threads active 159 if (!tickEvent.scheduled()) { 160 schedule(tickEvent, nextCycle()); 161 } 162 } else { 163 threadInfo[tid]->notIdleFraction = 0; 164 } 165 } | 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(); |
|
166} 167 168bool 169AtomicSimpleCPU::tryCompleteDrain() 170{ 171 if (drainState() != DrainState::Draining) 172 return false; 173 --- 525 unchanged lines hidden --- | 172} 173 174bool 175AtomicSimpleCPU::tryCompleteDrain() 176{ 177 if (drainState() != DrainState::Draining) 178 return false; 179 --- 525 unchanged lines hidden --- |