Source-Changes-HG archive

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

[src/trunk]: src/sys/arch PMCs for amd64 - still disabled, like i386.



details:   https://anonhg.NetBSD.org/src/rev/e48d24350c74
branches:  trunk
changeset: 822264:e48d24350c74
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Mar 10 14:54:12 2017 +0000

description:
PMCs for amd64 - still disabled, like i386.

diffstat:

 sys/arch/amd64/amd64/machdep.c |  7 +++++--
 sys/arch/amd64/conf/GENERIC    |  6 ++++--
 sys/arch/x86/x86/sys_machdep.c |  9 ++++++---
 3 files changed, 15 insertions(+), 7 deletions(-)

diffs (99 lines):

diff -r b45b9524a933 -r e48d24350c74 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Fri Mar 10 14:40:56 2017 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Fri Mar 10 14:54:12 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.252 2017/02/23 03:34:22 kamil Exp $      */
+/*     $NetBSD: machdep.c,v 1.253 2017/03/10 14:54:12 maxv Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252 2017/02/23 03:34:22 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.253 2017/03/10 14:54:12 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -170,6 +170,7 @@
 #include <machine/gdt.h>
 #include <machine/intr.h>
 #include <machine/pio.h>
+#include <machine/pmc.h>
 #include <machine/psl.h>
 #include <machine/reg.h>
 #include <machine/specialreg.h>
@@ -1780,6 +1781,8 @@
        }
 #endif
 
+       pmc_init();
+
        pcb->pcb_dbregs = NULL;
 
        x86_dbregs_setup_initdbstate();
diff -r b45b9524a933 -r e48d24350c74 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Fri Mar 10 14:40:56 2017 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Fri Mar 10 14:54:12 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.454 2017/02/26 12:41:50 rin Exp $
+# $NetBSD: GENERIC,v 1.455 2017/03/10 14:54:12 maxv Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.454 $"
+#ident         "GENERIC-$Revision: 1.455 $"
 
 maxusers       64              # estimated number of users
 
@@ -81,6 +81,8 @@
 powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 vmt0           at cpu0         # VMware Tools
 
+#options       PMC             # performance-monitoring counters support
+
 # Alternate buffer queue strategies for better responsiveness under high
 # disk I/O load.
 #options       BUFQ_READPRIO
diff -r b45b9524a933 -r e48d24350c74 sys/arch/x86/x86/sys_machdep.c
--- a/sys/arch/x86/x86/sys_machdep.c    Fri Mar 10 14:40:56 2017 +0000
+++ b/sys/arch/x86/x86/sys_machdep.c    Fri Mar 10 14:54:12 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_machdep.c,v 1.34 2017/02/18 14:36:32 maxv Exp $    */
+/*     $NetBSD: sys_machdep.c,v 1.35 2017/03/10 14:54:12 maxv Exp $    */
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.34 2017/02/18 14:36:32 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.35 2017/03/10 14:54:12 maxv Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_user_ldt.h"
@@ -84,7 +84,6 @@
  */
 #undef USER_LDT
 /* Need to be checked. */
-#undef PMC
 #undef IOPERM
 #else
 #if defined(XEN)
@@ -94,6 +93,10 @@
 #endif /* defined(XEN) */
 #endif
 
+#ifdef XEN
+#undef PMC
+#endif
+
 #ifdef VM86
 #include <machine/vm86.h>
 #endif



Home | Main Index | Thread Index | Old Index