NetBSD Problem Report #52704

From www@NetBSD.org  Mon Nov  6 14:10:25 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 617C17A1E3
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  6 Nov 2017 14:10:25 +0000 (UTC)
Message-Id: <20171106141024.72AEF7A25E@mollari.NetBSD.org>
Date: Mon,  6 Nov 2017 14:10:24 +0000 (UTC)
From: kzhr@d1.dion.ne.jp
Reply-To: kzhr@d1.dion.ne.jp
To: gnats-bugs@NetBSD.org
Subject: netbsd-8 build break for OPENBLOCKS600 kernel
X-Send-Pr-Version: www-1.0

>Number:         52704
>Category:       kern
>Synopsis:       netbsd-8 build break for OPENBLOCKS600 kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 06 14:15:00 +0000 2017
>Closed-Date:    Wed Feb 20 01:53:49 +0000 2019
>Last-Modified:  Wed Feb 20 01:53:49 +0000 2019
>Originator:     Kazuhiro Ito
>Release:        netbsd-8 at Nov 6 2017
>Organization:
>Environment:
Linux 4.13.0-1-amd64 #1 SMP Debian 4.13.10-1 (2017-10-30) x86_64 GNU/Linux
>Description:
OPENBLOCKS600 kernel can't be built.
>How-To-Repeat:
Build OPENBLOCKS600 kernel.
$ ./build.sh -m evbppc -u -U tools kernel=OPENBLOCKS600

#   compile  OPENBLOCKS600/obs600_autoconf.o
/usr/NetBSD/src/obj/tooldir.Linux-4.13.0-1-amd64-x86_64/bin/powerpc--netbsd-gcc -mcpu=405 -msdata=none -msoft-float -ffreestanding -fno-zero-initialized-in-bss -g -O2 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wreturn-type -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare --sysroot=/usr/NetBSD/src/obj/destdir.evbppc -D__obs405__ -Devbppc=evbppc -I. -I/usr/NetBSD/src/sys/../common/lib/libx86emu -I/usr/NetBSD/src/sys/../common/include -I/usr/NetBSD/src/sys/arch -I/usr/NetBSD/src/sys -nostdinc -DPPC_INTR_IMPL=<powerpc/intr.h> -DPPC_PCI_MACHDEP_IMPL=<powerpc/pci_machdep.h> -DSPILLSTK=1024 -DEVBPPC_HAS_MBR -DKERNBASE=0x25000 -DDEBUG -DTRAP_PANICWAIT -DDISKLABEL_EI -DEXT2FS_SYSTEM_FLAGS -DEMAC_EVENT_COUNTERS -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/usr/NetBSD/src/sys/lib/libkern/../../../common/l
 ib/libc/quad -I/usr/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string -I/usr/NetBSD/src/sys/external/bsd/ipf -I/usr/NetBSD/src/sys/external/bsd/common/include -I/usr/NetBSD/src/sys/external/bsd -I/usr/NetBSD/src/sys/external/bsd/dwc2/dist -c /usr/NetBSD/src/sys/arch/evbppc/obs405/obs600_autoconf.c -o obs600_autoconf.o
In file included from ./machine/bus_funcs.h:3:0,
                 from /usr/NetBSD/src/sys/sys/bus.h:215,
                 from /usr/NetBSD/src/sys/dev/usb/usbdivar.h:74,
                 from /usr/NetBSD/src/sys/arch/evbppc/obs405/obs600_autoconf.c:55:
/usr/NetBSD/src/sys/external/bsd/dwc2/dist/dwc2_core.h: In function 'dwc2_is_host_mode':
/usr/NetBSD/src/sys/external/bsd/dwc2/dwc2.h:67:39: error: dereferencing pointer to incomplete type 'struct dwc2_softc'
     bus_space_read_4((hsotg)->hsotg_sc->sc_iot, (hsotg)->hsotg_sc->sc_ioh, (reg))
                                       ^
./powerpc/bus_funcs.h:202:6: note: in definition of macro 'bus_space_read_4'
  ((*(t)->pbs_scalar.pbss_read_4)((t), (h), (o)))
      ^
/usr/NetBSD/src/sys/external/bsd/dwc2/dist/dwc2_core.h:1147:10: note: in expansion of macro 'DWC2_READ_4'
  return (DWC2_READ_4(hsotg, GINTSTS) & GINTSTS_CURMODE_HOST) != 0;
          ^

>Fix:
Apply below patch.

diff --git a/sys/arch/evbppc/obs405/obs600_autoconf.c b/sys/arch/evbppc/obs405/obs600_autoconf.c
index 773fb08095a7..75ad833ab84a 100644
--- a/sys/arch/evbppc/obs405/obs600_autoconf.c
+++ b/sys/arch/evbppc/obs405/obs600_autoconf.c
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: obs600_autoconf.c,v 1.7 2013/11/21 13:52:27 kiyohara
 #include <dev/usb/usbdivar.h>

 #include <dwc2/dwc2.h>
+#include <dwc2/dwc2var.h>
 #include "dwc2_core.h"

 /* This parameters was set from u-boot. */

>Release-Note:

>Audit-Trail:
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52704 CVS commit: src/sys/arch/evbppc/obs405
Date: Mon, 18 Feb 2019 06:27:10 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Mon Feb 18 06:27:10 UTC 2019

 Modified Files:
 	src/sys/arch/evbppc/obs405: obs600_autoconf.c

 Log Message:
  Fix compile error reported by Kazuhiro Ito in PR kern/52704.


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbppc/obs405/obs600_autoconf.c

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

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52704 CVS commit: [netbsd-8] src/sys/arch/evbppc/obs405
Date: Tue, 19 Feb 2019 15:11:48 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Feb 19 15:11:47 UTC 2019

 Modified Files:
 	src/sys/arch/evbppc/obs405 [netbsd-8]: obs600_autoconf.c

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #1193):

 	sys/arch/evbppc/obs405/obs600_autoconf.c: revision 1.8

 Fix compile error reported by Kazuhiro Ito in PR kern/52704.


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.7.22.1 src/sys/arch/evbppc/obs405/obs600_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: msaitoh@NetBSD.org
State-Changed-When: Wed, 20 Feb 2019 01:53:49 +0000
State-Changed-Why:
Fixed and pulled up.
Thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.