timing.cc (13954:2f400a5f2627) timing.cc (14085:0075b0d29d55)
1/*
2 * Copyright 2014 Google, Inc.
3 * Copyright (c) 2010-2013,2015,2017-2018 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

--- 86 unchanged lines hidden (view full) ---

95{
96 // Deschedule any power gating event (if any)
97 deschedulePowerGatingEvent();
98
99 if (switchedOut())
100 return DrainState::Drained;
101
102 if (_status == Idle ||
1/*
2 * Copyright 2014 Google, Inc.
3 * Copyright (c) 2010-2013,2015,2017-2018 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

--- 86 unchanged lines hidden (view full) ---

95{
96 // Deschedule any power gating event (if any)
97 deschedulePowerGatingEvent();
98
99 if (switchedOut())
100 return DrainState::Drained;
101
102 if (_status == Idle ||
103 (_status == BaseSimpleCPU::Running && isDrained())) {
103 (_status == BaseSimpleCPU::Running && isCpuDrained())) {
104 DPRINTF(Drain, "No need to drain.\n");
105 activeThreads.clear();
106 return DrainState::Drained;
107 } else {
108 DPRINTF(Drain, "Requesting drain.\n");
109
110 // The fetch event can become descheduled if a drain didn't
111 // succeed on the first attempt. We need to reschedule it if

--- 44 unchanged lines hidden (view full) ---

156
157bool
158TimingSimpleCPU::tryCompleteDrain()
159{
160 if (drainState() != DrainState::Draining)
161 return false;
162
163 DPRINTF(Drain, "tryCompleteDrain.\n");
104 DPRINTF(Drain, "No need to drain.\n");
105 activeThreads.clear();
106 return DrainState::Drained;
107 } else {
108 DPRINTF(Drain, "Requesting drain.\n");
109
110 // The fetch event can become descheduled if a drain didn't
111 // succeed on the first attempt. We need to reschedule it if

--- 44 unchanged lines hidden (view full) ---

156
157bool
158TimingSimpleCPU::tryCompleteDrain()
159{
160 if (drainState() != DrainState::Draining)
161 return false;
162
163 DPRINTF(Drain, "tryCompleteDrain.\n");
164 if (!isDrained())
164 if (!isCpuDrained())
165 return false;
166
167 DPRINTF(Drain, "CPU done draining, processing drain event\n");
168 signalDrainDone();
169
170 return true;
171}
172

--- 909 unchanged lines hidden ---
165 return false;
166
167 DPRINTF(Drain, "CPU done draining, processing drain event\n");
168 signalDrainDone();
169
170 return true;
171}
172

--- 909 unchanged lines hidden ---