summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/cpuevent.hh18
-rw-r--r--src/cpu/o3/commit_impl.hh2
2 files changed, 11 insertions, 9 deletions
diff --git a/src/cpu/cpuevent.hh b/src/cpu/cpuevent.hh
index 3339f8252..c973621c0 100644
--- a/src/cpu/cpuevent.hh
+++ b/src/cpu/cpuevent.hh
@@ -36,12 +36,14 @@
class ThreadContext;
-/** This class creates a global list of events that need a pointer to a
- * thread context. When a switchover takes place the events can be migrated
- * to the new thread context, otherwise you could have a wake timer interrupt
- * go off on a switched out cpu or other unfortunate events. This object MUST be
- * dynamically allocated to avoid it being deleted after a cpu switch happens.
- * */
+/**
+ * This class creates a global list of events that need a pointer to a
+ * thread context. When a switchover takes place the events can be
+ * migrated to the new thread context, otherwise you could have a wake
+ * timer interrupt go off on a switched out cpu or other unfortunate
+ * events. This object MUST be dynamically allocated to avoid it being
+ * deleted after a cpu switch happens.
+ */
class CpuEvent : public Event
{
protected:
@@ -78,8 +80,8 @@ class CpuEventWrapper : public CpuEvent
T *object;
public:
- CpuEventWrapper(T *obj, ThreadContext *_tc, EventQueue *q = &mainEventQueue,
- Priority p = Default_Pri)
+ CpuEventWrapper(T *obj, ThreadContext *_tc,
+ EventQueue *q = &mainEventQueue, Priority p = Default_Pri)
: CpuEvent(q, _tc, p), object(obj)
{ }
void process() { (object->*F)(tc); }
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index c3c4983c5..96f094926 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -998,7 +998,7 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
{
DPRINTF(Commit, "Waiting for all stores to writeback.\n");
return false;
- } else if (inst_num > 0) {
+ } else if (inst_num > 0 || iewStage->hasStoresToWB()) {
DPRINTF(Commit, "Waiting to become head of commit.\n");
return false;
}