Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/61a8220e5412
branches:  netbsd-6
changeset: 775750:61a8220e5412
user:      riz <riz%NetBSD.org@localhost>
date:      Sun Mar 31 20:34:27 2013 +0000

description:
Pull up following revision(s) (requested by chs in ticket #856):
        sys/arch/x86/x86/intr.c: revision 1.75
only use db_printf() if we're actually called from DDB.
this prevents the boot-time one from pausing the boot process.

diffstat:

 sys/arch/x86/x86/intr.c |  39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diffs (83 lines):

diff -r 9ee1fa631a56 -r 61a8220e5412 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Sun Mar 31 20:32:01 2013 +0000
+++ b/sys/arch/x86/x86/intr.c   Sun Mar 31 20:34:27 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.72 2011/08/01 10:42:24 drochner Exp $       */
+/*     $NetBSD: intr.c,v 1.72.8.1 2013/03/31 20:34:27 riz Exp $        */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.72 2011/08/01 10:42:24 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.72.8.1 2013/03/31 20:34:27 riz Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -1063,10 +1063,6 @@
 
 #if defined(INTRDEBUG) || defined(DDB)
 
-#ifdef DDB
-#define printf db_printf
-#endif
-
 void
 intr_printconfig(void)
 {
@@ -1075,30 +1071,45 @@
        struct intrsource *isp;
        struct cpu_info *ci;
        CPU_INFO_ITERATOR cii;
+       void (*pr)(const char *, ...);
+
+       pr = printf;
+#ifdef DDB
+       extern int db_active;
+       if (db_active) {
+               pr = db_printf;
+       }
+#endif
 
        for (CPU_INFO_FOREACH(cii, ci)) {
-               printf("%s: interrupt masks:\n", device_xname(ci->ci_dev));
+               (*pr)("%s: interrupt masks:\n", device_xname(ci->ci_dev));
                for (i = 0; i < NIPL; i++)
-                       printf("IPL %d mask %lx unmask %lx\n", i,
+                       (*pr)("IPL %d mask %lx unmask %lx\n", i,
                            (u_long)ci->ci_imask[i], (u_long)ci->ci_iunmask[i]);
                for (i = 0; i < MAX_INTR_SOURCES; i++) {
                        isp = ci->ci_isources[i];
                        if (isp == NULL)
                                continue;
-                       printf("%s source %d is pin %d from pic %s maxlevel %d\n",
+                       (*pr)("%s source %d is pin %d from pic %s type %d maxlevel %d\n",
                            device_xname(ci->ci_dev), i, isp->is_pin,
-                           isp->is_pic->pic_name, isp->is_maxlevel);
+                           isp->is_pic->pic_name, isp->is_type, isp->is_maxlevel);
                        for (ih = isp->is_handlers; ih != NULL;
                             ih = ih->ih_next)
-                               printf("\thandler %p level %d\n",
+                               (*pr)("\thandler %p level %d\n",
                                    ih->ih_fun, ih->ih_level);
+#if NIOAPIC > 0
+                       if (isp->is_pic->pic_type == PIC_IOAPIC) {
+                               struct ioapic_softc *sc;
+                               sc = isp->is_pic->pic_ioapic;
+                               (*pr)("\tioapic redir 0x%x\n",
+                                   sc->sc_pins[isp->is_pin].ip_map->redir);
+                       }
+#endif
 
                }
        }
 }
-#ifdef DDB
-#undef printf
-#endif
+
 #endif
 
 void



Home | Main Index | Thread Index | Old Index