Fix build with HWPMC_HOOKS enabled.

This commit is contained in:
Maxim Sobolev 2016-03-15 01:17:38 +00:00
parent 1d52250154
commit dd923e0c4a

View File

@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/smp.h>
#include <sys/sched.h>
#include <sys/pmc.h>
#include <sys/pmckern.h>
#include <machine/bus.h>
#include <machine/hwfunc.h>
@ -217,8 +219,11 @@ mips_pic_intr(void *arg)
KASSERT(i == 0, ("all interrupts handled"));
#ifdef HWPMC_HOOKS
if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN))
if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) {
struct trapframe *tf = PCPU_GET(curthread)->td_intr_frame;
pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, tf);
}
#endif
return (FILTER_HANDLED);
}