cycleCounterEventId(p->cycleEventId),
swIncrementEvent(nullptr),
reg_pmcr_conf(0),
- interrupt(p->interrupt->get())
+ interrupt(nullptr),
{
DPRINTF(PMUVerbose, "Initializing the PMU.\n");
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 */
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
static const RegVal reg_pmcr_wr_mask;
/** Performance monitor interrupt number */
- ArmInterruptPin *const interrupt;
+ ArmInterruptPin *interrupt;
/**
* List of event types supported by this PMU.