NetBSD Problem Report #43449

From jarle@darling.urc.uninett.no  Thu Jun 10 19:06:43 2010
Return-Path: <jarle@darling.urc.uninett.no>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D5F4163B935
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Jun 2010 19:06:43 +0000 (UTC)
Message-Id: <20100610190636.24DCDA83E@darling.urc.uninett.no>
Date: Thu, 10 Jun 2010 21:06:35 +0200 (CEST)
From: jarle@uninett.no
Reply-To: jarle@uninett.no
To: gnats-bugs@gnats.NetBSD.org
Subject: Patch required for system without PCI buses
X-Send-Pr-Version: 3.95

>Number:         43449
>Category:       port-i386
>Synopsis:       Patch required for system without PCI buses
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 10 19:10:00 +0000 2010
>Closed-Date:    Tue Feb 22 07:13:19 +0000 2011
>Last-Modified:  Tue Feb 22 07:13:19 +0000 2011
>Originator:     Jarle Greipsland
>Release:        NetBSD 5.99.30
>Organization:

>Environment:


System: NetBSD darling.urc.uninett.no 5.99.30 NetBSD 5.99.30 (DARLING) #0: Thu Jun 10 20:15:59 CEST 2010 jarle@darling.urc.uninett.no:/usr/obj/sys/arch/i386/compile/DARLING i386
Architecture: i386
Machine: i386
>Description:
For a memory-challenged old system I keep around, I normally build a
custom kernel with all of the non-needed stuff removed.  Thus the
config file has no references to PCI or USB or other modern devices.
Unfortunately the custom kernel would not build this time around.  I
had to apply the attached patches.
o The prototype for config_rootfound is declared in sys/device.h.  Without
  including this file the compiler complains about "implicit declaration"
  of said function.  Patch 1 explicitly includes sys/device.h in
  i386/i386/autoconf.c instead of hoping that some other header file
  will include it for us.
o The vga_posth variable is only used/referenced inside a #if NPCI>0/#endif
  block.  Arrange for the variable declaration to be enclosed similarly.

>How-To-Repeat:

>Fix:
Index: i386/i386/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/autoconf.c,v
retrieving revision 1.95
diff -u -r1.95 autoconf.c
--- i386/i386/autoconf.c	21 Nov 2009 03:11:00 -0000	1.95
+++ i386/i386/autoconf.c	10 Jun 2010 18:53:04 -0000
@@ -56,6 +56,7 @@
 #include <sys/systm.h>
 #include <sys/buf.h>
 #include <sys/proc.h>
+#include <sys/device.h>

 #include <machine/pte.h>
 #include <machine/cpu.h>

Index: x86/x86/x86_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/x86_autoconf.c,v
retrieving revision 1.50
diff -u -r1.50 x86_autoconf.c
--- x86/x86/x86_autoconf.c	24 Feb 2010 22:37:55 -0000	1.50
+++ x86/x86/x86_autoconf.c	10 Jun 2010 18:53:12 -0000
@@ -76,7 +76,7 @@
 static struct genfb_colormap_callback gfb_cb;
 static struct genfb_pmf_callback pmf_cb;
 #endif
-#ifdef VGA_POST
+#if defined(VGA_POST) && NPCI > 0
 static struct vga_post *vga_posth = NULL;
 #endif


>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43449 CVS commit: src/sys/arch/x86/x86
Date: Tue, 22 Feb 2011 06:33:34 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Tue Feb 22 06:33:34 UTC 2011

 Modified Files:
 	src/sys/arch/x86/x86: x86_autoconf.c

 Log Message:
 vga_posth should be inside NPCI > 0; from Jarle Greipsland in PR 43449.


 To generate a diff of this commit:
 cvs rdiff -u -r1.57 -r1.58 src/sys/arch/x86/x86/x86_autoconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43449 CVS commit: src/sys/arch
Date: Tue, 22 Feb 2011 06:37:24 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Tue Feb 22 06:37:24 UTC 2011

 Modified Files:
 	src/sys/arch/amd64/amd64: autoconf.c
 	src/sys/arch/i386/i386: autoconf.c

 Log Message:
 Include <sys/device.h> for config_rootfound, instead of relying on it
 being included by accident. From Jarle Greipsland in PR 43449.


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/amd64/autoconf.c
 cvs rdiff -u -r1.96 -r1.97 src/sys/arch/i386/i386/autoconf.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: dholland@NetBSD.org
State-Changed-When: Tue, 22 Feb 2011 07:13:19 +0000
State-Changed-Why:
Fixed, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.