diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-09-16 20:24:05 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-09-16 20:24:05 -0700 |
commit | 3f9f4bf3d6ce9080adb03966599e0f1a98b091eb (patch) | |
tree | 31c4b767f6d06cfcbfbd8ea6d8155b8efc6894b3 /src/dev/intel_8254_timer.cc | |
parent | 2dd9f4fcf02c68eb86a6742576eecb3eef3b9ddf (diff) | |
download | gem5-3f9f4bf3d6ce9080adb03966599e0f1a98b091eb.tar.xz |
devices: undo cset 017baf09599f that added timer drain functions.
It's not the right fix for the checkpoint deadlock problem
Brad was having, and creates another bug where the system can
deadlock on restore. Brad can't reproduce the original bug
right now, so we'll wait until it arises again and then try
to fix it the right way then.
Diffstat (limited to 'src/dev/intel_8254_timer.cc')
-rw-r--r-- | src/dev/intel_8254_timer.cc | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/dev/intel_8254_timer.cc b/src/dev/intel_8254_timer.cc index b61aa7c56..9e507b968 100644 --- a/src/dev/intel_8254_timer.cc +++ b/src/dev/intel_8254_timer.cc @@ -32,7 +32,6 @@ #include "base/misc.hh" #include "dev/intel_8254_timer.hh" -#include "sim/sim_object.hh" using namespace std; @@ -70,17 +69,6 @@ Intel8254Timer::writeControl(const CtrlReg data) } } -unsigned int -Intel8254Timer::drain(Event *de) -{ - unsigned int count = 0; - count += counter[0]->drain(de); - count += counter[1]->drain(de); - count += counter[2]->drain(de); - assert(count == 0); - return count; -} - void Intel8254Timer::serialize(const string &base, ostream &os) { @@ -228,18 +216,6 @@ Intel8254Timer::Counter::outputHigh() return output_high; } -unsigned int -Intel8254Timer::Counter::drain(Event *de) -{ - if (event.scheduled()) { - event_tick = event.when(); - parent->deschedule(event); - } else { - event_tick = 0; - } - return 0; -} - void Intel8254Timer::Counter::serialize(const string &base, ostream &os) { @@ -251,6 +227,10 @@ Intel8254Timer::Counter::serialize(const string &base, ostream &os) paramOut(os, base + ".latch_on", latch_on); paramOut(os, base + ".read_byte", read_byte); paramOut(os, base + ".write_byte", write_byte); + + Tick event_tick = 0; + if (event.scheduled()) + event_tick = event.when(); paramOut(os, base + ".event_tick", event_tick); } @@ -267,6 +247,7 @@ Intel8254Timer::Counter::unserialize(const string &base, Checkpoint *cp, paramIn(cp, section, base + ".read_byte", read_byte); paramIn(cp, section, base + ".write_byte", write_byte); + Tick event_tick; paramIn(cp, section, base + ".event_tick", event_tick); if (event_tick) parent->schedule(event, event_tick); |