summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-05-23 15:26:35 +0000
committerandrew <andrew@FreeBSD.org>2016-05-23 15:26:35 +0000
commit57b4892772d00fdcb740a4dce1c6df985e81da4c (patch)
treeaaefafbcb0d0358e1752fd8424275ec96a0554c1
parentc7a0643d1cbea585773ab642582ec3f5e7fcc953 (diff)
downloadFreeBSD-src-57b4892772d00fdcb740a4dce1c6df985e81da4c.zip
FreeBSD-src-57b4892772d00fdcb740a4dce1c6df985e81da4c.tar.gz
Add the needed hwpmc hooks to subr_intr.c. This is needed for the correct
operation of hwpmc on, for example, arm64 with intrng. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/kern/subr_intr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c
index bb9fbb5..cb80880 100644
--- a/sys/kern/subr_intr.c
+++ b/sys/kern/subr_intr.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include "opt_acpi.h"
#include "opt_ddb.h"
+#include "opt_hwpmc_hooks.h"
#include "opt_platform.h"
#include <sys/param.h>
@@ -53,6 +54,10 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <sys/sched.h>
#include <sys/smp.h>
+#ifdef HWPMC_HOOKS
+#include <sys/pmckern.h>
+#endif
+
#include <machine/atomic.h>
#include <machine/intr.h>
#include <machine/cpu.h>
@@ -311,6 +316,10 @@ intr_irq_handler(struct trapframe *tf)
irq_root_filter(irq_root_arg);
td->td_intr_frame = oldframe;
critical_exit();
+#ifdef HWPMC_HOOKS
+ if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN))
+ pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, tf);
+#endif
}
/*
OpenPOWER on IntegriCloud