arch,cpu: Change setCPU to setThreadContext in Interrupts.
The ThreadContext can be used to access the cpu if needed, and is a more representative interface to various pieces of state than the CPU itself. Also convert some of the methods in Interupts to use the locally stored ThreadContext pointer instead of taking one as an argument. This makes calling those methods simpler and less error prone. Change-Id: I740bd99f92e54e052a618a4ae2927ea1c4ece193 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28988 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -733,7 +733,7 @@ void
|
||||
DefaultCommit<Impl>::handleInterrupt()
|
||||
{
|
||||
// Verify that we still have an interrupt to handle
|
||||
if (!cpu->checkInterrupts(cpu->tcBase(0))) {
|
||||
if (!cpu->checkInterrupts(0)) {
|
||||
DPRINTF(Commit, "Pending interrupt is cleared by master before "
|
||||
"it got handled. Restart fetching from the orig path.\n");
|
||||
toIEW->commitInfo[0].clearInterrupt = true;
|
||||
@@ -813,7 +813,7 @@ DefaultCommit<Impl>::commit()
|
||||
{
|
||||
if (FullSystem) {
|
||||
// Check if we have a interrupt and get read to handle it
|
||||
if (cpu->checkInterrupts(cpu->tcBase(0)))
|
||||
if (cpu->checkInterrupts(0))
|
||||
propagateInterrupt();
|
||||
}
|
||||
|
||||
@@ -1125,7 +1125,7 @@ DefaultCommit<Impl>::commitInsts()
|
||||
//
|
||||
// If we don't do this, we might end up in a live lock situation
|
||||
if (!interrupt && avoidQuiesceLiveLock &&
|
||||
onInstBoundary && cpu->checkInterrupts(cpu->tcBase(0)))
|
||||
onInstBoundary && cpu->checkInterrupts(0))
|
||||
squashAfter(tid, head_inst);
|
||||
} else {
|
||||
DPRINTF(Commit, "Unable to commit head instruction PC:%s "
|
||||
|
||||
Reference in New Issue
Block a user