Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Oh. Don't call svs_pdir_switch if SVS is di...



details:   https://anonhg.NetBSD.org/src/rev/2f507338e2c3
branches:  trunk
changeset: 324606:2f507338e2c3
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Jul 12 18:39:09 2018 +0000

description:
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.

diffstat:

 sys/arch/x86/x86/cpu.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 344f9eb67892 -r 2f507338e2c3 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Thu Jul 12 18:03:31 2018 +0000
+++ b/sys/arch/x86/x86/cpu.c    Thu Jul 12 18:39:09 2018 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index