Source-Changes-HG archive

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

[src/trunk]: src/sys various aprint_* fixes.



details:   https://anonhg.NetBSD.org/src/rev/ac8bc220ea8a
branches:  trunk
changeset: 752913:ac8bc220ea8a
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Mar 11 03:54:56 2010 +0000

description:
various aprint_* fixes.

diffstat:

 sys/arch/sparc64/dev/ebus.c         |  11 ++++++-----
 sys/arch/sparc64/dev/iommu.c        |  10 +++++-----
 sys/arch/sparc64/dev/rtc.c          |   5 +++--
 sys/arch/sparc64/dev/sab.c          |   6 ++++--
 sys/arch/sparc64/dev/schizo.c       |  13 +++++++------
 sys/arch/sparc64/dev/tda.c          |   3 ++-
 sys/arch/sparc64/sparc64/autoconf.c |   9 +++++----
 sys/arch/sparc64/sparc64/clock.c    |  11 ++++-------
 sys/arch/sparc64/sparc64/cpu.c      |  17 +++++++++--------
 sys/dev/i2c/adm1021.c               |   5 +++--
 sys/dev/ic/esiop.c                  |   7 +++----
 sys/dev/ieee1394/firewire.c         |   8 ++++++--
 sys/dev/ieee1394/if_fwip.c          |   8 ++++++--
 sys/dev/mii/ukphy.c                 |   5 +++--
 sys/dev/pci/alipm.c                 |   5 +++--
 sys/dev/pci/if_cas.c                |   5 +++--
 sys/dev/pci/if_hme_pci.c            |   5 +++--
 sys/dev/pci/machfb.c                |  36 +++++++++++++++++++++---------------
 sys/dev/pci/ohci_pci.c              |   5 +++--
 sys/dev/scsipi/cd.c                 |   5 +++--
 sys/dev/sun/fb.c                    |  21 +++++++++++----------
 sys/dev/wscons/wsdisplay.c          |   5 +++--
 22 files changed, 116 insertions(+), 89 deletions(-)

diffs (truncated from 824 to 300 lines):

diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/dev/ebus.c
--- a/sys/arch/sparc64/dev/ebus.c       Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/dev/ebus.c       Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ebus.c,v 1.53 2008/10/13 12:25:22 nakayama Exp $       */
+/*     $NetBSD: ebus.c,v 1.54 2010/03/11 03:54:56 mrg Exp $    */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ebus.c,v 1.53 2008/10/13 12:25:22 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ebus.c,v 1.54 2010/03/11 03:54:56 mrg Exp $");
 
 #include "opt_ddb.h"
 
@@ -168,10 +168,11 @@
        int node, nmapmask, error;
        char devinfo[256];
 
-       printf("\n");
+       aprint_normal("\n");
+       aprint_naive("\n");
 
        pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
-       printf("%s: %s, revision 0x%02x\n", device_xname(self), devinfo,
+       aprint_normal_dev(self, "%s, revision 0x%02x\n", devinfo,
            PCI_REVISION(pa->pa_class));
 
        sc->sc_memtag = pa->pa_memt;
@@ -227,7 +228,7 @@
                char *name = prom_getpropstring(node, "name");
 
                if (ebus_setup_attach_args(sc, node, &eba) != 0) {
-                       printf("ebus_attach: %s: incomplete\n", name);
+                       aprint_error("ebus_attach: %s: incomplete\n", name);
                        continue;
                } else {
                        DPRINTF(EDB_CHILD, ("- found child `%s', attaching\n",
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c      Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/dev/iommu.c      Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iommu.c,v 1.97 2010/02/24 06:34:55 skrll Exp $ */
+/*     $NetBSD: iommu.c,v 1.98 2010/03/11 03:54:56 mrg Exp $   */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.97 2010/02/24 06:34:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.98 2010/03/11 03:54:56 mrg Exp $");
 
 #include "opt_ddb.h"
 
@@ -204,10 +204,10 @@
        /*
         * Now all the hardware's working we need to allocate a dvma map.
         */
-       printf("DVMA map: %x to %x\n",
+       aprint_debug("DVMA map: %x to %x\n",
                (unsigned int)is->is_dvmabase,
                (unsigned int)is->is_dvmaend);
-       printf("IOTSB: %llx to %llx\n",
+       aprint_debug("IOTSB: %llx to %llx\n",
                (unsigned long long)is->is_ptsb,
                (unsigned long long)(is->is_ptsb + size - 1));
        is->is_dvmamap = extent_create(name,
@@ -415,7 +415,7 @@
 
        /* Bypass non-coherent D$ */
        while ((!ldxa(sb->sb_flushpa, ASI_PHYS_CACHED)) &&
-               timercmp(&cur, &flushtimeout, <=))
+              timercmp(&cur, &flushtimeout, <=))
                microtime(&cur);
 
 #ifdef DIAGNOSTIC
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/dev/rtc.c
--- a/sys/arch/sparc64/dev/rtc.c        Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/dev/rtc.c        Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtc.c,v 1.6 2008/12/14 23:13:18 mrg Exp $      */
+/*     $NetBSD: rtc.c,v 1.7 2010/03/11 03:54:56 mrg Exp $      */
 
 /*
  * Copyright (c) 1992, 1993
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.6 2008/12/14 23:13:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.7 2010/03/11 03:54:56 mrg Exp $");
 
 /*
  * Clock driver for 'rtc' - mc146818 driver.
@@ -166,6 +166,7 @@
        mc146818_attach(sc);
 
        aprint_normal(": %s\n", model);
+       aprint_naive(": Clock\n");
 
        /*
         * Turn interrupts off, just in case. (Although they shouldn't
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/dev/sab.c
--- a/sys/arch/sparc64/dev/sab.c        Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/dev/sab.c        Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sab.c,v 1.44 2010/01/18 09:58:20 jdc Exp $     */
+/*     $NetBSD: sab.c,v 1.45 2010/03/11 04:19:56 mrg Exp $     */
 /*     $OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $   */
 
 /*
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.44 2010/01/18 09:58:20 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.45 2010/03/11 04:19:56 mrg Exp $");
 
 #include "opt_kgdb.h"
 #include <sys/types.h>
@@ -289,6 +289,7 @@
                break;
        }
        aprint_normal("\n");
+       aprint_naive(": Serial controller\n");
 
        /* Let current output drain */
        DELAY(100000);
@@ -483,6 +484,7 @@
        }
 
        aprint_normal("\n");
+       aprint_naive(": Serial port\n");
 }
 
 int
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/dev/schizo.c
--- a/sys/arch/sparc64/dev/schizo.c     Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/dev/schizo.c     Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: schizo.c,v 1.15 2010/03/11 03:30:16 mrg Exp $  */
+/*     $NetBSD: schizo.c,v 1.16 2010/03/11 03:54:56 mrg Exp $  */
 /*     $OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $        */
 
 /*
@@ -142,7 +142,7 @@
        int *busranges = NULL, nranges;
        char *str;
 
-       printf(": addr %" PRIx64, ma->ma_reg[0].ur_paddr);
+       aprint_normal(": addr %" PRIx64, ma->ma_reg[0].ur_paddr);
        str = prom_getpropstring(ma->ma_node, "compatible");
        if (strcmp(str, "pci108e,a801") == 0)
                sc->sc_tomatillo = 1;
@@ -154,7 +154,7 @@
        if (bus_space_map(sc->sc_bustag, ma->ma_reg[1].ur_paddr - 0x10000UL,
            sizeof(struct schizo_regs), 0,
            &sc->sc_ctrlh)) {
-               printf(": failed to map registers\n");
+               aprint_error(": failed to map registers\n");
                return;
        }
 
@@ -185,7 +185,7 @@
        if (bus_space_map(sc->sc_bustag, ma->ma_reg[0].ur_paddr,
                          ma->ma_reg[0].ur_len,
                          BUS_SPACE_MAP_LINEAR, &pbm->sp_intrh)) {
-               printf(": failed to interrupt map registers\n");
+               aprint_error(": failed to interrupt map registers\n");
                return;
        }
 
@@ -197,10 +197,11 @@
            (void **)&busranges))
                panic("schizo: can't get bus-range");
 
-       printf(": \"%s\", version %d, ign %x, bus %c %d to %d\n",
+       aprint_normal(": \"%s\", version %d, ign %x, bus %c %d to %d\n",
            sc->sc_tomatillo ? "Tomatillo" : "Schizo",
            prom_getpropint(sc->sc_node, "version#", 0), sc->sc_ign,
            pbm->sp_bus_a ? 'A' : 'B', busranges[0], busranges[1]);
+       aprint_naive("\n");
 
        if (bus_space_subregion(pbm->sp_regt, sc->sc_ctrlh,
            pbm->sp_bus_a ? offsetof(struct schizo_regs, pbm_a) :
@@ -230,7 +231,7 @@
                aprint_debug("%s: no streaming buffers\n", sc->sc_dv.dv_xname);
        }
 
-       printf("%s: ", sc->sc_dv.dv_xname);
+       aprint_normal("%s: ", sc->sc_dv.dv_xname);
        schizo_init_iommu(sc, pbm);
 
        pbm->sp_memt = schizo_alloc_mem_tag(pbm);
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/dev/tda.c
--- a/sys/arch/sparc64/dev/tda.c        Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/dev/tda.c        Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tda.c,v 1.2 2010/03/01 22:53:09 martin Exp $   */
+/*     $NetBSD: tda.c,v 1.3 2010/03/11 04:19:56 mrg Exp $      */
 /*     $OpenBSD: tda.c,v 1.4 2008/02/27 17:25:00 robert Exp $ */
 
 /*
@@ -102,6 +102,7 @@
        sc->sc_addr = ia->ia_addr;
 
        aprint_normal(": %s\n", ia->ia_name);
+       aprint_naive(": Environment sensor\n");
 
        /*
         * Set the fans to maximum speed and save the power levels;
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c       Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c       Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.172 2010/03/06 08:08:29 mrg Exp $ */
+/*     $NetBSD: autoconf.c,v 1.173 2010/03/11 03:54:56 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.172 2010/03/06 08:08:29 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.173 2010/03/11 03:54:56 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -566,10 +566,11 @@
        OF_getprop(findroot(), "name", machine_model, sizeof machine_model);
        prom_getidprom();
        if (i)
-               printf(": %s (%s): hostid %lx\n", machine_model,
+               aprint_normal(": %s (%s): hostid %lx\n", machine_model,
                    machine_banner, hostid);
        else
-               printf(": %s: hostid %lx\n", machine_model, hostid);
+               aprint_normal(": %s: hostid %lx\n", machine_model, hostid);
+       aprint_naive("\n");
 
        /*
         * Locate and configure the ``early'' devices.  These must be
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c  Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c  Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.100 2009/05/16 19:15:34 nakayama Exp $ */
+/*     $NetBSD: clock.c,v 1.101 2010/03/11 03:54:56 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.100 2009/05/16 19:15:34 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.101 2010/03/11 03:54:56 mrg Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -327,10 +327,7 @@
 
        /* set the next interrupt time */
        ci->ci_tick_increment = ci->ci_cpu_clockrate[0] / hz;
-#ifdef DEBUG
-       printf("Using %%tick -- intr in %ld cycles\n",
-           ci->ci_tick_increment);
-#endif
+
        s = intr_disable();
        next_tick(ci->ci_tick_increment);
        intr_restore(s);
@@ -386,7 +383,7 @@
 
        if (!timerreg_4u.t_timer || !timerreg_4u.t_clrintr) {
 
-               printf("No counter-timer -- using %%tick at %luMHz as "
+               aprint_normal("No counter-timer -- using %%tick at %luMHz as "
                        "system clock.\n",
                        (unsigned long)curcpu()->ci_cpu_clockrate[1]);
 
diff -r ee835c8fbe18 -r ac8bc220ea8a sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c    Thu Mar 11 03:30:16 2010 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c    Thu Mar 11 03:54:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.92 2010/03/11 03:12:42 mrg Exp $ */
+/*     $NetBSD: cpu.c,v 1.93 2010/03/11 03:54:56 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>



Home | Main Index | Thread Index | Old Index