Make use of the KPI added in r331252.

MFC after:	2 weeks
This commit is contained in:
Mark Johnston 2018-03-20 21:16:26 +00:00
parent 6e7f286b47
commit 7a79ce2e38
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331264

View File

@ -35,6 +35,7 @@
#include <sys/dtrace.h>
#include <machine/cpufunc.h>
#include <machine/md_var.h>
#include "fbt.h"
@ -145,15 +146,11 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval)
void
fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val)
{
u_long cr0save;
register_t intr;
bool old_wp;
intr = intr_disable();
cr0save = rcr0();
load_cr0(cr0save & ~CR0_WP);
old_wp = disable_wp();
*fbt->fbtp_patchpoint = val;
load_cr0(cr0save);
intr_restore(intr);
restore_wp(old_wp);
}
int