diff options
author | zbb <zbb@FreeBSD.org> | 2016-02-11 11:59:32 +0000 |
---|---|---|
committer | zbb <zbb@FreeBSD.org> | 2016-02-11 11:59:32 +0000 |
commit | 0740653d54119f91b101f35a01f9ee2a4fdec95b (patch) | |
tree | 739ea5a40d5fe1b9629a831e6a9b8e6b4bf1e725 /sys/arm64 | |
parent | 95137856d119ee0d525eb022f97b0b53749fdf8a (diff) | |
download | FreeBSD-src-0740653d54119f91b101f35a01f9ee2a4fdec95b.zip FreeBSD-src-0740653d54119f91b101f35a01f9ee2a4fdec95b.tar.gz |
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
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/arm64/intr_machdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arm64/arm64/intr_machdep.c b/sys/arm64/arm64/intr_machdep.c index 277e0c1..5994279 100644 --- a/sys/arm64/arm64/intr_machdep.c +++ b/sys/arm64/arm64/intr_machdep.c @@ -473,10 +473,6 @@ stray: 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 |