Module Name: src
Committed By: mrg
Date: Sun Feb 20 10:02:02 UTC 2011
Modified Files:
src/sys/arch/sparc/sparc: cpu.c cpuvar.h genassym.cf locore.s
Log Message:
remove the evcnt for NULL struct fpstate * ipi, and switch over to an
explicit panic() if we get one.
i'm pretty sure that converting xmpsg_lock from IPL_VM to IPL_SCHED
fixed this problem properly. i have not seen the evcnt trigger since
that change, nor have several others queried.
To generate a diff of this commit:
cvs rdiff -u -r1.230 -r1.231 src/sys/arch/sparc/sparc/cpu.c
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/sparc/sparc/cpuvar.h
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sparc/sparc/genassym.cf
cvs rdiff -u -r1.262 -r1.263 src/sys/arch/sparc/sparc/locore.s
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/sparc/sparc/cpu.c
diff -u src/sys/arch/sparc/sparc/cpu.c:1.230 src/sys/arch/sparc/sparc/cpu.c:1.231
--- src/sys/arch/sparc/sparc/cpu.c:1.230 Tue Feb 15 09:05:14 2011
+++ src/sys/arch/sparc/sparc/cpu.c Sun Feb 20 10:02:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.230 2011/02/15 09:05:14 mrg Exp $ */
+/* $NetBSD: cpu.c,v 1.231 2011/02/20 10:02:01 mrg Exp $ */
/*
* Copyright (c) 1996
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.230 2011/02/15 09:05:14 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.231 2011/02/20 10:02:01 mrg Exp $");
#include "opt_multiprocessor.h"
#include "opt_lockdebug.h"
@@ -342,14 +342,9 @@
/*
* Setup the per-cpu counters.
- *
- * The "savefp null" counter should go away when the NULL
- * struct fpstate * bug is fixed.
*/
evcnt_attach_dynamic(&cpi->ci_savefpstate, EVCNT_TYPE_MISC,
NULL, cpu_name(cpi), "savefp ipi");
- evcnt_attach_dynamic(&cpi->ci_savefpstate_null, EVCNT_TYPE_MISC,
- NULL, cpu_name(cpi), "savefp null ipi");
evcnt_attach_dynamic(&cpi->ci_xpmsg_mutex_fail, EVCNT_TYPE_MISC,
NULL, cpu_name(cpi), "IPI mutex_trylock fail");
evcnt_attach_dynamic(&cpi->ci_xpmsg_mutex_fail_call, EVCNT_TYPE_MISC,
Index: src/sys/arch/sparc/sparc/cpuvar.h
diff -u src/sys/arch/sparc/sparc/cpuvar.h:1.88 src/sys/arch/sparc/sparc/cpuvar.h:1.89
--- src/sys/arch/sparc/sparc/cpuvar.h:1.88 Tue Feb 15 09:05:14 2011
+++ src/sys/arch/sparc/sparc/cpuvar.h Sun Feb 20 10:02:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuvar.h,v 1.88 2011/02/15 09:05:14 mrg Exp $ */
+/* $NetBSD: cpuvar.h,v 1.89 2011/02/20 10:02:01 mrg Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -337,7 +337,6 @@
vaddr_t ci_free_sva1, ci_free_eva1, ci_free_sva2, ci_free_eva2;
struct evcnt ci_savefpstate;
- struct evcnt ci_savefpstate_null;
struct evcnt ci_xpmsg_mutex_fail;
struct evcnt ci_xpmsg_mutex_fail_call;
struct evcnt ci_intrcnt[16];
Index: src/sys/arch/sparc/sparc/genassym.cf
diff -u src/sys/arch/sparc/sparc/genassym.cf:1.64 src/sys/arch/sparc/sparc/genassym.cf:1.65
--- src/sys/arch/sparc/sparc/genassym.cf:1.64 Thu Jan 27 06:24:59 2011
+++ src/sys/arch/sparc/sparc/genassym.cf Sun Feb 20 10:02:01 2011
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.64 2011/01/27 06:24:59 mrg Exp $
+# $NetBSD: genassym.cf,v 1.65 2011/02/20 10:02:01 mrg Exp $
#
# Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -171,7 +171,6 @@
define CPUINFO_MTX_OLDSPL offsetof(struct cpu_info, ci_mtx_oldspl)
define CPUINFO_IDEPTH offsetof(struct cpu_info, ci_idepth)
define CPUINFO_SAVEFPSTATE offsetof(struct cpu_info, ci_savefpstate)
-define CPUINFO_SAVEFPSTATE_NULL offsetof(struct cpu_info, ci_savefpstate_null)
# PTE bits and related information
define PG_W PG_W
Index: src/sys/arch/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.262 src/sys/arch/sparc/sparc/locore.s:1.263
--- src/sys/arch/sparc/sparc/locore.s:1.262 Tue Feb 15 11:30:21 2011
+++ src/sys/arch/sparc/sparc/locore.s Sun Feb 20 10:02:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.262 2011/02/15 11:30:21 mrg Exp $ */
+/* $NetBSD: locore.s,v 1.263 2011/02/20 10:02:01 mrg Exp $ */
/*
* Copyright (c) 1996 Paul Kranenburg
@@ -5912,24 +5912,13 @@
std %f30, [%o0 + FS_REGS + (4*30)]
/*
- * We really should panic here but while we figure out what the bug is
- * that a remote CPU gets a NULL struct fpstate *, this lets the system
- * work at least seemingly stably.
+ * We got a NULL struct fpstate * on the IPI. We panic.
*/
Lfp_null_fpstate:
-#if 1
- sethi %hi(CPUINFO_VA), %o5
- ldd [%o5 + CPUINFO_SAVEFPSTATE_NULL], %o2
- inccc %o3
- addx %o2, 0, %o2
- retl
- std %o2, [%o5 + CPUINFO_SAVEFPSTATE_NULL]
-#else
ld [%o5 + CPUINFO_CPUNO], %o1
sethi %hi(Lpanic_savefpstate), %o0
call _C_LABEL(panic)
or %o0, %lo(Lpanic_savefpstate), %o0
-#endif
1:
/*