svn commit: r224358 - stable/8/sys/sparc64/sparc64
Marius Strobl
marius at FreeBSD.org
Mon Jul 25 18:23:25 UTC 2011
Author: marius
Date: Mon Jul 25 18:23:24 2011
New Revision: 224358
URL: http://svn.freebsd.org/changeset/base/224358
Log:
MFC: r223235
- As with stray vector interrupts limit the reporting of stray level
interrupts. Bringup on additional machine models repeatedly reveals
firmware that enables interrupts behind our back, causing the console
to be flooded otherwise.
- As with the regular interrupt counters using uint16_t instead of
u_long for counting the stray vector interrupts should be more than
sufficient.
- Cache the interrupt vector in intr_stray_vector().
Modified:
stable/8/sys/sparc64/sparc64/intr_machdep.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/geom/label/ (props changed)
Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/intr_machdep.c Mon Jul 25 18:17:12 2011 (r224357)
+++ stable/8/sys/sparc64/sparc64/intr_machdep.c Mon Jul 25 18:23:24 2011 (r224358)
@@ -83,10 +83,11 @@ CTASSERT((1 << IV_SHIFT) == sizeof(struc
ih_func_t *intr_handlers[PIL_MAX];
uint16_t pil_countp[PIL_MAX];
+static uint16_t pil_stray_count[PIL_MAX];
struct intr_vector intr_vectors[IV_MAX];
uint16_t intr_countp[IV_MAX];
-static u_long intr_stray_count[IV_MAX];
+static uint16_t intr_stray_count[IV_MAX];
static const char *const pil_names[] = {
"stray",
@@ -198,22 +199,32 @@ intr_setup(int pri, ih_func_t *ihf, int
static void
intr_stray_level(struct trapframe *tf)
{
+ uint64_t level;
- printf("stray level interrupt %ld\n", tf->tf_level);
+ level = tf->tf_level;
+ if (pil_stray_count[level] < MAX_STRAY_LOG) {
+ printf("stray level interrupt %ld\n", level);
+ pil_stray_count[level]++;
+ if (pil_stray_count[level] >= MAX_STRAY_LOG)
+ printf("got %d stray level interrupt %ld's: not "
+ "logging anymore\n", MAX_STRAY_LOG, level);
+ }
}
static void
intr_stray_vector(void *cookie)
{
struct intr_vector *iv;
+ u_int vec;
iv = cookie;
- if (intr_stray_count[iv->iv_vec] < MAX_STRAY_LOG) {
- printf("stray vector interrupt %d\n", iv->iv_vec);
- intr_stray_count[iv->iv_vec]++;
- if (intr_stray_count[iv->iv_vec] >= MAX_STRAY_LOG)
- printf("got %d stray interrupt %d's: not logging "
- "anymore\n", MAX_STRAY_LOG, iv->iv_vec);
+ vec = iv->iv_vec;
+ if (intr_stray_count[vec] < MAX_STRAY_LOG) {
+ printf("stray vector interrupt %d\n", vec);
+ intr_stray_count[vec]++;
+ if (intr_stray_count[vec] >= MAX_STRAY_LOG)
+ printf("got %d stray vector interrupt %d's: not "
+ "logging anymore\n", MAX_STRAY_LOG, vec);
}
}
More information about the svn-src-stable-8
mailing list