Module Name: src
Committed By: maxv
Date: Thu Jul 12 18:39:09 UTC 2018
Modified Files:
src/sys/arch/x86/x86: cpu.c
Log Message:
Oh. Don't call svs_pdir_switch if SVS is disabled, that's not needed.
I was playing around with PMCs, and was wondering why some cache misses
were occurring in svs_pdir_switch while I had SVS disabled.
To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/x86/x86/cpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.158 src/sys/arch/x86/x86/cpu.c:1.159
--- src/sys/arch/x86/x86/cpu.c:1.158 Fri Jun 22 06:22:37 2018
+++ src/sys/arch/x86/x86/cpu.c Thu Jul 12 18:39:09 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.158 2018/06/22 06:22:37 maxv Exp $ */
+/* $NetBSD: cpu.c,v 1.159 2018/07/12 18:39:09 maxv Exp $ */
/*
* Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.158 2018/06/22 06:22:37 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.159 2018/07/12 18:39:09 maxv Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -1286,7 +1286,9 @@ void
cpu_load_pmap(struct pmap *pmap, struct pmap *oldpmap)
{
#ifdef SVS
- svs_pdir_switch(pmap);
+ if (svs_enabled) {
+ svs_pdir_switch(pmap);
+ }
#endif
#ifdef PAE