NetBSD Problem Report #48701
From www@NetBSD.org Fri Apr 4 01:50:12 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 9002BA5811
for <gnats-bugs@gnats.NetBSD.org>; Fri, 4 Apr 2014 01:50:10 +0000 (UTC)
Message-Id: <20140404015006.26A52A5811@mollari.NetBSD.org>
Date: Fri, 4 Apr 2014 01:50:06 +0000 (UTC)
From: fstd.lkml@gmail.com
Reply-To: fstd.lkml@gmail.com
To: gnats-bugs@NetBSD.org
Subject: spurious messages while booting silently (gpio, glxsb)
X-Send-Pr-Version: www-1.0
>Number: 48701
>Category: kern
>Synopsis: spurious messages while booting silently (gpio, glxsb)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 04 01:55:00 +0000 2014
>Closed-Date: Fri Apr 04 18:10:06 +0000 2014
>Last-Modified: Fri Apr 04 18:10:06 +0000 2014
>Originator: Timo Buhrmester
>Release: NetBSD 6.1.3
>Organization:
>Environment:
NetBSD alix.localdomain 6.1.3 NetBSD 6.1.3 (ALIXKERN) #2: Fri Apr 4 03:18:36 CEST 2014 toor@alix.localdomain:/usr/obj/sys/arch/i386/compile/ALIXKERN i386
>Description:
``silent'' boot's twiddling is interrupted by fragments of messages from both ``glxsb'' and the ``gpio'' driver.
It looks like this:
[...bootloader messages...]
Detecting hardware...: RNG AES
: 32 pins
done.
[...timestamp + login...]
I've tracked down the issue to usage of ``printf()'' instead of ``aprint_normal()'', the latter seems to be appropriate in this case.
Attached is a patch which fixes this.
>How-To-Repeat:
boot silent (boot -z) on a machine having hardware driven by glxsb and/or GPIO delat with by the gpio driver.cat /tmnpcat
>Fix:
Index: sys/arch/i386/pci/glxsb.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/pci/glxsb.c,v
retrieving revision 1.10
diff -u -r1.10 glxsb.c
--- sys/arch/i386/pci/glxsb.c 19 Nov 2011 22:51:20 -0000 1.10
+++ sys/arch/i386/pci/glxsb.c 4 Apr 2014 01:45:01 -0000
@@ -253,7 +253,7 @@
callout_init(&sc->sc_co, 0);
callout_setfunc(&sc->sc_co, glxsb_rnd, sc);
glxsb_rnd(sc);
- printf(": RNG");
+ aprint_normal(": RNG");
/* We don't have an interrupt handler, so disable completion INTs */
intr = SB_AI_DISABLE_AES_A | SB_AI_DISABLE_AES_B |
@@ -264,9 +264,9 @@
sc->sc_dmat = pa->pa_dmat;
if (glxsb_crypto_setup(sc))
- printf(" AES");
+ aprint_normal(" AES");
- printf("\n");
+ aprint_normal("\n");
}
void
Index: sys/dev/gpio/gpio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/gpio/gpio.c,v
retrieving revision 1.50
diff -u -r1.50 gpio.c
--- sys/dev/gpio/gpio.c 25 Nov 2011 13:49:43 -0000 1.50
+++ sys/dev/gpio/gpio.c 4 Apr 2014 01:45:30 -0000
@@ -198,7 +198,7 @@
sc->sc_pins = gba->gba_pins;
sc->sc_npins = gba->gba_npins;
- printf(": %d pins\n", sc->sc_npins);
+ aprint_normal(": %d pins\n", sc->sc_npins);
if (!pmf_device_register(self, NULL, gpio_resume))
aprint_error_dev(self, "couldn't establish power handler\n");
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48701 CVS commit: src/sys
Date: Fri, 4 Apr 2014 10:47:26 -0400
Module Name: src
Committed By: christos
Date: Fri Apr 4 14:47:26 UTC 2014
Modified Files:
src/sys/arch/i386/pci: glxsb.c
src/sys/dev/gpio: gpio.c
Log Message:
PR/48701: Timo Buhrmester: spurious messages while booting silently (gpio,
glxsb); use aprint_normal()
>Category: kern
>Synopsis: spurious messages while booting silently (gpio, glxsb)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/pci/glxsb.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/gpio/gpio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Fri, 04 Apr 2014 18:10:06 +0000
State-Changed-Why:
Fixed by christos. Thanks for the patches!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.