summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/pmu.cc10
-rw-r--r--src/arch/arm/pmu.hh2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/arch/arm/pmu.cc b/src/arch/arm/pmu.cc
index 30425153f..7d8892cf6 100644
--- a/src/arch/arm/pmu.cc
+++ b/src/arch/arm/pmu.cc
@@ -67,7 +67,7 @@ PMU::PMU(const ArmPMUParams *p)
cycleCounterEventId(p->cycleEventId),
swIncrementEvent(nullptr),
reg_pmcr_conf(0),
- interrupt(p->interrupt->get())
+ interrupt(nullptr),
{
DPRINTF(PMUVerbose, "Initializing the PMU.\n");
@@ -76,7 +76,7 @@ PMU::PMU(const ArmPMUParams *p)
maximumCounterCount);
}
- warn_if(!interrupt, "ARM PMU: No interrupt specified, interrupt " \
+ warn_if(!p->interrupt, "ARM PMU: No interrupt specified, interrupt " \
"delivery disabled.\n");
/* Setup the performance counter ID registers */
@@ -97,8 +97,10 @@ void
PMU::setThreadContext(ThreadContext *tc)
{
DPRINTF(PMUVerbose, "Assigning PMU to ContextID %i.\n", tc->contextId());
- if (interrupt)
- interrupt->setThreadContext(tc);
+ auto pmu_params = static_cast<const ArmPMUParams *>(params());
+
+ if (pmu_params->interrupt)
+ interrupt = pmu_params->interrupt->get(tc);
}
void
diff --git a/src/arch/arm/pmu.hh b/src/arch/arm/pmu.hh
index de931eeb2..f5f521330 100644
--- a/src/arch/arm/pmu.hh
+++ b/src/arch/arm/pmu.hh
@@ -619,7 +619,7 @@ class PMU : public SimObject, public ArmISA::BaseISADevice {
static const RegVal reg_pmcr_wr_mask;
/** Performance monitor interrupt number */
- ArmInterruptPin *const interrupt;
+ ArmInterruptPin *interrupt;
/**
* List of event types supported by this PMU.