Unbreak amd64 FBT after r330539.

X-MFC with:	r330539
This commit is contained in:
Mark Johnston 2018-03-06 15:51:59 +00:00
parent c293f08a32
commit 1aa8a926b8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330541

View File

@ -34,6 +34,8 @@
#include <sys/dtrace.h>
#include <machine/cpufunc.h>
#include "fbt.h"
#define FBT_PUSHL_EBP 0x55
@ -143,8 +145,15 @@ 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;
intr = intr_disable();
cr0save = rcr0();
load_cr0(cr0save & ~CR0_WP);
*fbt->fbtp_patchpoint = val;
load_cr0(cr0save);
intr_restore(intr);
}
int