summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-03-29 14:05:26 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-03-29 14:05:26 -0500
commitac778b1d02b0e7674811ab2a7463add16a430b36 (patch)
tree90ba9559d88e2d2f4a791eb3f457c9c48521d646 /src
parentd2fd3b2ec2c265eb9ed3bdcc1db3e4c3feee3846 (diff)
downloadgem5-ac778b1d02b0e7674811ab2a7463add16a430b36.tar.xz
o3cpu: commit: changes interrupt handling
Currently the commit stage keeps a local copy of the interrupt object. Since the interrupt is usually handled several cycles after the commit stage becomes aware of it, it is possible that the local copy of the interrupt object may not be the interrupt that is actually handled. It is possible that another interrupt occurred in the interval between interrupt detection and interrupt handling. This patch creates a copy of the interrupt just before the interrupt is handled. The local copy is ignored.
Diffstat (limited to 'src')
-rw-r--r--src/cpu/o3/commit_impl.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index c7b255123..2c1c9fef2 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -752,8 +752,10 @@ DefaultCommit<Impl>::handleInterrupt()
cpu->checker->handlePendingInt();
}
- // CPU will handle interrupt.
- cpu->processInterrupts(interrupt);
+ // CPU will handle interrupt. Note that we ignore the local copy of
+ // interrupt. This is because the local copy may no longer be the
+ // interrupt that the interrupt controller thinks is being handled.
+ cpu->processInterrupts(cpu->getInterrupts());
thread[0]->noSquashFromTC = false;