Module Name:    src
Committed By:   maxv
Date:           Fri Mar 10 14:54:12 UTC 2017

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/amd64/conf: GENERIC
        src/sys/arch/x86/x86: sys_machdep.c

Log Message:
PMCs for amd64 - still disabled, like i386.


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.253 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.454 -r1.455 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/sys_machdep.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.252 src/sys/arch/amd64/amd64/machdep.c:1.253
--- src/sys/arch/amd64/amd64/machdep.c:1.252	Thu Feb 23 03:34:22 2017
+++ src/sys/arch/amd64/amd64/machdep.c	Fri Mar 10 14:54:12 2017
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #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 @@ init_x86_64(paddr_t first_avail)
 	}
 #endif
 
+	pmc_init();
+
 	pcb->pcb_dbregs = NULL;
 
 	x86_dbregs_setup_initdbstate();

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.454 src/sys/arch/amd64/conf/GENERIC:1.455
--- src/sys/arch/amd64/conf/GENERIC:1.454	Sun Feb 26 12:41:50 2017
+++ src/sys/arch/amd64/conf/GENERIC	Fri Mar 10 14:54:12 2017
@@ -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 @@ include 	"arch/amd64/conf/std.amd64"
 
 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 @@ est0		at cpu0		# Intel Enhanced SpeedSte
 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

Index: src/sys/arch/x86/x86/sys_machdep.c
diff -u src/sys/arch/x86/x86/sys_machdep.c:1.34 src/sys/arch/x86/x86/sys_machdep.c:1.35
--- src/sys/arch/x86/x86/sys_machdep.c:1.34	Sat Feb 18 14:36:32 2017
+++ src/sys/arch/x86/x86/sys_machdep.c	Fri Mar 10 14:54:12 2017
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.
  */
 #undef	USER_LDT
 /* Need to be checked. */
-#undef	PMC
 #undef	IOPERM
 #else
 #if defined(XEN)
@@ -94,6 +93,10 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.
 #endif /* defined(XEN) */
 #endif
 
+#ifdef XEN
+#undef	PMC
+#endif
+
 #ifdef VM86
 #include <machine/vm86.h>
 #endif

Reply via email to