Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc remove the evcnt for NULL struct fpstat...



details:   https://anonhg.NetBSD.org/src/rev/8fcddd5c0024
branches:  trunk
changeset: 762385:8fcddd5c0024
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Feb 20 10:02:01 2011 +0000

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

diffstat:

 sys/arch/sparc/sparc/cpu.c       |   9 ++-------
 sys/arch/sparc/sparc/cpuvar.h    |   3 +--
 sys/arch/sparc/sparc/genassym.cf |   3 +--
 sys/arch/sparc/sparc/locore.s    |  15 ++-------------
 4 files changed, 6 insertions(+), 24 deletions(-)

diffs (102 lines):

diff -r e32faf5d2806 -r 8fcddd5c0024 sys/arch/sparc/sparc/cpu.c
--- a/sys/arch/sparc/sparc/cpu.c        Sun Feb 20 08:40:24 2011 +0000
+++ b/sys/arch/sparc/sparc/cpu.c        Sun Feb 20 10:02:01 2011 +0000
@@ -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,
diff -r e32faf5d2806 -r 8fcddd5c0024 sys/arch/sparc/sparc/cpuvar.h
--- a/sys/arch/sparc/sparc/cpuvar.h     Sun Feb 20 08:40:24 2011 +0000
+++ b/sys/arch/sparc/sparc/cpuvar.h     Sun Feb 20 10:02:01 2011 +0000
@@ -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];
diff -r e32faf5d2806 -r 8fcddd5c0024 sys/arch/sparc/sparc/genassym.cf
--- a/sys/arch/sparc/sparc/genassym.cf  Sun Feb 20 08:40:24 2011 +0000
+++ b/sys/arch/sparc/sparc/genassym.cf  Sun Feb 20 10:02:01 2011 +0000
@@ -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
diff -r e32faf5d2806 -r 8fcddd5c0024 sys/arch/sparc/sparc/locore.s
--- a/sys/arch/sparc/sparc/locore.s     Sun Feb 20 08:40:24 2011 +0000
+++ b/sys/arch/sparc/sparc/locore.s     Sun Feb 20 10:02:01 2011 +0000
@@ -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:
 
 /*



Home | Main Index | Thread Index | Old Index