svn commit: r330541 - head/sys/cddl/dev/fbt/x86

Mark Johnston markj at FreeBSD.org
Tue Mar 6 15:52:00 UTC 2018


Author: markj
Date: Tue Mar  6 15:51:59 2018
New Revision: 330541
URL: https://svnweb.freebsd.org/changeset/base/330541

Log:
  Unbreak amd64 FBT after r330539.
  
  X-MFC with:	r330539

Modified:
  head/sys/cddl/dev/fbt/x86/fbt_isa.c

Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c
==============================================================================
--- head/sys/cddl/dev/fbt/x86/fbt_isa.c	Tue Mar  6 14:31:15 2018	(r330540)
+++ head/sys/cddl/dev/fbt/x86/fbt_isa.c	Tue Mar  6 15:51:59 2018	(r330541)
@@ -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, uin
 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


More information about the svn-src-head mailing list