sim: Don't clear the active CPU vector in System::initState
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>
Fri, 15 May 2015 17:39:44 +0000 (13:39 -0400)
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>
Fri, 15 May 2015 17:39:44 +0000 (13:39 -0400)
The system class currently clears the vector of active CPUs in
initState(). CPUs are added to the list by registerThreadContext()
which is called from BaseCPU::init(). This obviously breaks when the
System object is initialized after the CPUs. This changeset removes
the offending clear() call since the list will be empty after it has
been instantiated anyway.

src/sim/system.cc

index 9bd487b0360d5e8958cd029c6dac9eda3f0385e6..2f242776976d1c1cfba139f5f7c746440d1b1641 100644 (file)
@@ -302,8 +302,6 @@ System::initState()
             DPRINTF(Loader, "Kernel loaded...\n");
         }
     }
-
-    activeCpus.clear();
 }
 
 void