The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=d5ce54dddf4927a2edd3e57ee67722dfccb567a8
commit d5ce54dddf4927a2edd3e57ee67722dfccb567a8 Author: Bojan Novković <bnov...@freebsd.org> AuthorDate: 2024-12-15 14:06:58 +0000 Commit: Bojan Novković <bnov...@freebsd.org> CommitDate: 2024-12-15 15:39:36 +0000 hwpmc_x86: Register interrupt handler using the dynamic NMI registration interface Register the PCINT handler using the nmi_{register, remove}_handler interfaces (introduced in D46421) in preparation for hwt(4)'s Intel Processor Trace backend. No functional change intended. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47989 --- sys/dev/hwpmc/hwpmc_x86.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c index 54cc919eec30..2c6c4cd148bf 100644 --- a/sys/dev/hwpmc/hwpmc_x86.c +++ b/sys/dev/hwpmc/hwpmc_x86.c @@ -248,6 +248,7 @@ pmc_md_initialize(void) continue; md->pmd_classdep[i].pcd_caps &= ~PMC_CAP_INTERRUPT; } + nmi_register_handler(md->pmd_intr); return (md); } @@ -257,6 +258,7 @@ pmc_md_finalize(struct pmc_mdep *md) { lapic_disable_pcint(); + nmi_remove_handler(md->pmd_intr); if (cpu_vendor_id == CPU_VENDOR_AMD || cpu_vendor_id == CPU_VENDOR_HYGON) pmc_amd_finalize(md);