Module Name: src
Committed By: martin
Date: Fri Apr 15 20:52:36 UTC 2011
Modified Files:
src/sys/arch/alpha/alpha: machdep.c trap.c
Log Message:
Delay initialization of FPU related event counters to cpu_startup() - we
do not expect any events of this type before spinup of all cpus.
To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/sys/arch/alpha/alpha/machdep.c
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/alpha/alpha/trap.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/alpha/alpha/machdep.c
diff -u src/sys/arch/alpha/alpha/machdep.c:1.330 src/sys/arch/alpha/alpha/machdep.c:1.331
--- src/sys/arch/alpha/alpha/machdep.c:1.330 Fri Mar 4 22:25:24 2011
+++ src/sys/arch/alpha/alpha/machdep.c Fri Apr 15 20:52:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.330 2011/03/04 22:25:24 joerg Exp $ */
+/* $NetBSD: machdep.c,v 1.331 2011/04/15 20:52:36 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.330 2011/03/04 22:25:24 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.331 2011/04/15 20:52:36 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -803,6 +803,7 @@
void
cpu_startup(void)
{
+ extern struct evcnt fpevent_use, fpevent_reuse;
vaddr_t minaddr, maxaddr;
char pbuf[9];
#if defined(DEBUG)
@@ -865,6 +866,14 @@
* CPUs.
*/
hwrpb_primary_init();
+
+ /*
+ * Initialize some trap event counters.
+ */
+ evcnt_attach_dynamic(&fpevent_use, EVCNT_TYPE_MISC, NULL,
+ "FP", "proc use");
+ evcnt_attach_dynamic(&fpevent_reuse, EVCNT_TYPE_MISC, NULL,
+ "FP", "proc re-use");
}
/*
Index: src/sys/arch/alpha/alpha/trap.c
diff -u src/sys/arch/alpha/alpha/trap.c:1.124 src/sys/arch/alpha/alpha/trap.c:1.125
--- src/sys/arch/alpha/alpha/trap.c:1.124 Mon Dec 20 00:25:24 2010
+++ src/sys/arch/alpha/alpha/trap.c Fri Apr 15 20:52:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.124 2010/12/20 00:25:24 matt Exp $ */
+/* $NetBSD: trap.c,v 1.125 2011/04/15 20:52:36 martin Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.124 2010/12/20 00:25:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.125 2011/04/15 20:52:36 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -149,17 +149,6 @@
*/
alpha_pal_wrmces(alpha_pal_rdmces() &
~(ALPHA_MCES_DSC|ALPHA_MCES_DPC));
-
- /*
- * If this is the primary processor, initialize some trap
- * event counters.
- */
- if (cpu_number() == hwrpb->rpb_primary_cpu_id) {
- evcnt_attach_dynamic(&fpevent_use, EVCNT_TYPE_MISC, NULL,
- "FP", "proc use");
- evcnt_attach_dynamic(&fpevent_reuse, EVCNT_TYPE_MISC, NULL,
- "FP", "proc re-use");
- }
}
static void