Review Board 2.0.15


Standard Switch: Drain the system before switching CPUs

Review Request #1385 - Created Aug. 31, 2012 and submitted - Latest diff uploaded

Information
Joel Hestness
gem5
default
Reviewers
Default
Changeset 9184:2306d524ec1c
---------------------------
Standard Switch: Drain the system before switching CPUs

When switching from an atomic CPU to any of the timing CPUs, a drain is
unnecessary since no events are scheduled in atomic mode. However, when
trying to switch CPUs starting with a timing CPU, there may be events
scheduled. This change ensures that all events are drained from the system
by calling m5.drain before switching CPUs.
Since m5.changeToTiming() is used by any atomic CPU -> timing CPU switch, tested all combinations of switches with x86. All prior working combinations still work correctly, and this patch enables timing -> detailed switch as necessary for Ruby.