Date: Tue, 20 Mar 2018 21:16:26 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331264 - head/sys/cddl/dev/fbt/x86 Message-ID: <201803202116.w2KLGQsF061167@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803202116.w2KLGQsF061167>