cpu.cc (12127:4207df055b0d) | cpu.cc (12143:e48005f585f2) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2011-2012, 2014, 2016 ARM Limited | 2 * Copyright (c) 2011-2012, 2014, 2016, 2017 ARM Limited |
3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 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 --- 1032 unchanged lines hidden (view full) --- 1043 // squash the rest of the instructions in the pipeline and force 1044 // the fetch stage to stall. The pipeline will be drained once all 1045 // in-flight instructions have retired. 1046 commit.drain(); 1047 1048 // Wake the CPU and record activity so everything can drain out if 1049 // the CPU was not able to immediately drain. 1050 if (!isDrained()) { | 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 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 --- 1032 unchanged lines hidden (view full) --- 1043 // squash the rest of the instructions in the pipeline and force 1044 // the fetch stage to stall. The pipeline will be drained once all 1045 // in-flight instructions have retired. 1046 commit.drain(); 1047 1048 // Wake the CPU and record activity so everything can drain out if 1049 // the CPU was not able to immediately drain. 1050 if (!isDrained()) { |
1051 // If a thread is suspended, wake it up so it can be drained 1052 for (auto t : threadContexts) { 1053 if (t->status() == ThreadContext::Suspended){ 1054 DPRINTF(Drain, "Currently suspended so activate %i \n", 1055 t->threadId()); 1056 t->activate(); 1057 // As the thread is now active, change the power state as well 1058 activateContext(t->threadId()); 1059 } 1060 } 1061 |
|
1051 wakeCPU(); 1052 activityRec.activity(); 1053 1054 DPRINTF(Drain, "CPU not drained\n"); 1055 1056 return DrainState::Draining; 1057 } else { 1058 DPRINTF(Drain, "CPU is already drained\n"); --- 750 unchanged lines hidden --- | 1062 wakeCPU(); 1063 activityRec.activity(); 1064 1065 DPRINTF(Drain, "CPU not drained\n"); 1066 1067 return DrainState::Draining; 1068 } else { 1069 DPRINTF(Drain, "CPU is already drained\n"); --- 750 unchanged lines hidden --- |