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

Mark Johnston markj at FreeBSD.org
Tue Mar 20 21:16:27 UTC 2018


Author: markj
Date: Tue Mar 20 21:16:26 2018
New Revision: 331264
URL: https://svnweb.freebsd.org/changeset/base/331264

Log:
  Make use of the KPI added in r331252.
  
  MFC after:	2 weeks

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 20 21:04:47 2018	(r331263)
+++ head/sys/cddl/dev/fbt/x86/fbt_isa.c	Tue Mar 20 21:16:26 2018	(r331264)
@@ -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, uin
 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


More information about the svn-src-head mailing list