NetBSD Problem Report #50283

From duck@shangtai.net  Sun Sep 27 11:17:35 2015
Return-Path: <duck@shangtai.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 82C30A5858
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 27 Sep 2015 11:17:35 +0000 (UTC)
Message-Id: <20150927111727.E5B57A75E9@knightrider.shangtai.net>
Date: Sun, 27 Sep 2015 14:17:26 +0300 (EEST)
From: duck@shangtai.net
Reply-To: duck@shangtai.net
To: gnats-bugs@gnats.NetBSD.org
Subject: kernel build failure on netbsd-7
X-Send-Pr-Version: 3.95

>Number:         50283
>Category:       port-alpha
>Synopsis:       kernel build failure on netbsd-7
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    thorpej
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 27 11:20:00 +0000 2015
>Closed-Date:    Sat Oct 10 20:17:32 +0000 2020
>Last-Modified:  Sat Oct 10 20:17:32 +0000 2020
>Originator:     Staffan Thomen
>Release:        NetBSD 6.1.5
>Organization:
>Environment:
System: NetBSD power 6.1.5 NetBSD 6.1.5 (XEN3_DOMU) amd64
Architecture: amd64
Machine: amd64
>Description:
Cross building a netbsd-7 (Sep 27) alpha kernel from my xeon server (xen/amd64)
failed in pci_machdep.c with a couple of warnings for defined-but-not-used
variables.

I guess this is because my alpha does not have a framebuffer.

>How-To-Repeat:
Build a netbsd-7 alpha kernel without a framebuffer defined (I guess)
>Fix:
--- sys/arch/alpha/pci/pci_machdep.c      2015-09-27 12:14:45.000000000 +0000
+++ sys/arch/alpha/pci/pci_machdep.c.orig 2015-09-27 12:13:06.000000000 +0000
@@ -65,8 +65,12 @@
 pci_display_console(bus_space_tag_t iot, bus_space_tag_t memt, pci_chipset_tag_t pc, int bus, int device, int function)
 {
        pcitag_t tag;
-       pcireg_t id, class;
+       pcireg_t id;
+#if NVGA_PCI || NTGA
+       pcireg_t class;
        int match, nmatch;
+#endif
+
        int (*fn)(bus_space_tag_t, bus_space_tag_t, pci_chipset_tag_t,
            int, int, int);

@@ -75,11 +79,12 @@
        if (id == 0 || id == 0xffffffff)
                panic("pci_display_console: no device at %d/%d/%d",
                    bus, device, function);
+#if NVGA_PCI || NTGA
+       nmatch = match = 0; /* XXX really only if we've got FBs configured */
        class = pci_conf_read(pc, tag, PCI_CLASS_REG);
+#endif

-       nmatch = match = 0; /* XXX really only if we've got FBs configured */
        fn = NULL;
-
 #if NVGA_PCI
        nmatch = DEVICE_IS_VGA_PCI(class, id);
        if (nmatch > match) {

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-alpha/50283: kernel build failure on netbsd-7
Date: Sat, 17 Oct 2015 17:35:02 +0200

 This has been fixed by a commit to head wich includes a tiny bit more
 of a change - could you test wether applying the full change works on -7
 for you?

 If it works, I'll submit a pullup request for the full change.

 Thanks,

 Martin


 Committed By:   uebayasi
 Date:           Fri Oct 17 18:31:07 UTC 2014

 Modified Files: 
         src/sys/arch/alpha/conf: files.alpha
         src/sys/arch/alpha/pci: pci_machdep.c 

 Log Message: 
 PCI controller doesn't rely on (depend on) AGP bus, but provide it.  If one
 specific architecture is known to have some specific AGP implementation, such
 suggestion must be done in the "selection" part, not the "definition" part.

 This is also an indirect (across bus attachment), circular dependency.


 To generate a diff of this commit:
 cvs rdiff -u -r1.187 -r1.188 src/sys/arch/alpha/conf/files.alpha
 cvs rdiff -u -r1.22 -r1.23 src/sys/arch/alpha/pci/pci_machdep.c

Responsible-Changed-From-To: port-alpha-maintainer->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Sat, 10 Oct 2020 20:17:32 +0000
Responsible-Changed-Why:
TAke.


State-Changed-From-To: open->closed
State-Changed-By: thorpej@NetBSD.org
State-Changed-When: Sat, 10 Oct 2020 20:17:32 +0000
State-Changed-Why:
netbsd-7 is retired, issue is fixed in later releases.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.