1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Call pmc_hook() correctly in the ARM64 interrupt handler

pmc_hook() was called only in case of the stray interrupt but should
rather be called on each interrupt. Move in to the arm_cpu_intr()
handler, out of the critical section too.

Reviewed by:   br
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5161
This commit is contained in:
Zbigniew Bodek 2016-02-11 11:59:32 +00:00
parent be7aab76ec
commit 55bdcadded
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295516

View File

@ -473,10 +473,6 @@ arm_dispatch_intr(u_int hw_irq, struct trapframe *tf)
if (intr != NULL)
PIC_MASK(root_pic, intr->i_hw_irq);
#ifdef HWPMC_HOOKS
if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN))
pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, tf);
#endif
}
void
@ -486,6 +482,10 @@ arm_cpu_intr(struct trapframe *tf)
critical_enter();
PIC_DISPATCH(root_pic, tf);
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
}
#ifdef SMP