Skip to content

Commit

Permalink
hwpmc_x86: Register interrupt handler using the dynamic NMI registrat…
Browse files Browse the repository at this point in the history
…ion 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
  • Loading branch information
bnovkov committed Dec 15, 2024
1 parent 7bcaff0 commit d5ce54d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys/dev/hwpmc/hwpmc_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down

0 comments on commit d5ce54d

Please sign in to comment.