From owner-freebsd-i386@FreeBSD.ORG Sun Nov 14 01:46:53 2010 Return-Path: Delivered-To: i386@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52B81065679; Sun, 14 Nov 2010 01:46:53 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 216198FC16; Sun, 14 Nov 2010 01:46:52 +0000 (UTC) Received: by wyb36 with SMTP id 36so1338249wyb.13 for ; Sat, 13 Nov 2010 17:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=WCH3jqKNZ7MREzRhHWC/Ebmwq9PT9HIyO9rE8iOzsIs=; b=i+YPjENctNwPpLFKzV4Gvr9v6aGmMr4SM/rewAPbXzfglV2CiyKriSTCjFS2/Fbv9f PoAj009q4KtOJNbIV95JFXnBYJJzJhWj7ZyTKFQSCVrHWoMGxpMiZc6Bp1yALE7e0+uo MH14eBBq2cITZlaGqviWxx+oT/kzfZ5UFd6iQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=xeR0oenpEMAjWqSHg35mtTtsmgnxwrJn00zMku+/1oBrgTCMntaOTh3XphatcRtjx4 TpwBK2kosf6E/dZH3vAY4DDrHuY6XZftbTrGIZYpRaHYzkgLGP4qkSj/Iu8CUjBelH4L JAjY1wtivxnBkGiipfA7U1fBNSHoz/I/aGOIo= MIME-Version: 1.0 Received: by 10.216.7.210 with SMTP id 60mr5646303wep.30.1289697707409; Sat, 13 Nov 2010 17:21:47 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Sat, 13 Nov 2010 17:21:47 -0800 (PST) In-Reply-To: <201011132338.oADNcZkA035129@freebsd-current.sentex.ca> References: <201011132338.oADNcZkA035129@freebsd-current.sentex.ca> Date: Sat, 13 Nov 2010 17:21:47 -0800 X-Google-Sender-Auth: tsGIncqsiA0jkQ_L0L3dkQkkxdk Message-ID: From: Garrett Cooper To: delphij@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Attilio Rao , scsi@freebsd.org, i386@freebsd.org Subject: Re: [head tinderbox] failure on i386/i386 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:46:54 -0000 On Sat, Nov 13, 2010 at 3:38 PM, FreeBSD Tinderbox wrote: > TB --- 2010-11-13 21:00:00 - tinderbox 2.6 running on freebsd-current.sen= tex.ca > TB --- 2010-11-13 21:00:00 - starting HEAD tinderbox run for i386/i386 > TB --- 2010-11-13 21:00:00 - cleaning the object tree > TB --- 2010-11-13 21:00:24 - cvsupping the source tree > TB --- 2010-11-13 21:00:24 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sente= x.ca /tinderbox/HEAD/i386/i386/supfile > TB --- 2010-11-13 21:00:51 - building world > TB --- 2010-11-13 21:00:51 - MAKEOBJDIRPREFIX=3D/obj > TB --- 2010-11-13 21:00:51 - PATH=3D/usr/bin:/usr/sbin:/bin:/sbin > TB --- 2010-11-13 21:00:51 - TARGET=3Di386 > TB --- 2010-11-13 21:00:51 - TARGET_ARCH=3Di386 > TB --- 2010-11-13 21:00:51 - TZ=3DUTC > TB --- 2010-11-13 21:00:51 - __MAKE_CONF=3D/dev/null > TB --- 2010-11-13 21:00:51 - cd /src > TB --- 2010-11-13 21:00:51 - /usr/bin/make -B buildworld >>>> World build started on Sat Nov 13 21:00:51 UTC 2010 >>>> Rebuilding the temporary build tree >>>> stage 1.1: legacy release compatibility shims >>>> stage 1.2: bootstrap tools >>>> stage 2.1: cleaning up the object tree >>>> stage 2.2: rebuilding the object tree >>>> stage 2.3: build tools >>>> stage 3: cross tools >>>> stage 4.1: building includes >>>> stage 4.2: building libraries >>>> stage 4.3: make dependencies >>>> stage 4.4: building everything >>>> World build completed on Sat Nov 13 22:46:32 UTC 2010 > TB --- 2010-11-13 22:46:32 - generating LINT kernel config > TB --- 2010-11-13 22:46:32 - cd /src/sys/i386/conf > TB --- 2010-11-13 22:46:32 - /usr/bin/make -B LINT > TB --- 2010-11-13 22:46:32 - building LINT kernel > TB --- 2010-11-13 22:46:32 - MAKEOBJDIRPREFIX=3D/obj > TB --- 2010-11-13 22:46:32 - PATH=3D/usr/bin:/usr/sbin:/bin:/sbin > TB --- 2010-11-13 22:46:32 - TARGET=3Di386 > TB --- 2010-11-13 22:46:32 - TARGET_ARCH=3Di386 > TB --- 2010-11-13 22:46:32 - TZ=3DUTC > TB --- 2010-11-13 22:46:32 - __MAKE_CONF=3D/dev/null > TB --- 2010-11-13 22:46:32 - cd /src > TB --- 2010-11-13 22:46:32 - /usr/bin/make -B buildkernel KERNCONF=3DLINT >>>> Kernel build for LINT started on Sat Nov 13 22:46:32 UTC 2010 >>>> stage 1: configuring the kernel >>>> stage 2.1: cleaning up the object tree >>>> stage 2.2: rebuilding the object tree >>>> stage 2.3: build tools >>>> stage 3.1: making dependencies >>>> stage 3.2: building everything >>>> Kernel build for LINT completed on Sat Nov 13 23:13:00 UTC 2010 > TB --- 2010-11-13 23:13:00 - building GENERIC kernel > TB --- 2010-11-13 23:13:00 - MAKEOBJDIRPREFIX=3D/obj > TB --- 2010-11-13 23:13:00 - PATH=3D/usr/bin:/usr/sbin:/bin:/sbin > TB --- 2010-11-13 23:13:00 - TARGET=3Di386 > TB --- 2010-11-13 23:13:00 - TARGET_ARCH=3Di386 > TB --- 2010-11-13 23:13:00 - TZ=3DUTC > TB --- 2010-11-13 23:13:00 - __MAKE_CONF=3D/dev/null > TB --- 2010-11-13 23:13:00 - cd /src > TB --- 2010-11-13 23:13:00 - /usr/bin/make -B buildkernel KERNCONF=3DGENE= RIC >>>> Kernel build for GENERIC started on Sat Nov 13 23:13:00 UTC 2010 >>>> stage 1: configuring the kernel >>>> stage 2.1: cleaning up the object tree >>>> stage 2.2: rebuilding the object tree >>>> stage 2.3: build tools >>>> stage 3.1: making dependencies >>>> stage 3.2: building everything >>>> Kernel build for GENERIC completed on Sat Nov 13 23:33:39 UTC 2010 > TB --- 2010-11-13 23:33:39 - WARNING: no kernel config for GENERIC64 > TB --- 2010-11-13 23:33:39 - building PAE kernel > TB --- 2010-11-13 23:33:39 - MAKEOBJDIRPREFIX=3D/obj > TB --- 2010-11-13 23:33:39 - PATH=3D/usr/bin:/usr/sbin:/bin:/sbin > TB --- 2010-11-13 23:33:39 - TARGET=3Di386 > TB --- 2010-11-13 23:33:39 - TARGET_ARCH=3Di386 > TB --- 2010-11-13 23:33:39 - TZ=3DUTC > TB --- 2010-11-13 23:33:39 - __MAKE_CONF=3D/dev/null > TB --- 2010-11-13 23:33:39 - cd /src > TB --- 2010-11-13 23:33:39 - /usr/bin/make -B buildkernel KERNCONF=3DPAE >>>> Kernel build for PAE started on Sat Nov 13 23:33:40 UTC 2010 >>>> stage 1: configuring the kernel >>>> stage 2.1: cleaning up the object tree >>>> stage 2.2: rebuilding the object tree >>>> stage 2.3: build tools >>>> stage 3.1: making dependencies >>>> stage 3.2: building everything > [...] > cc -c -O -pipe =A0-std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes =A0-Wmissing-prototypes -Wpointer-arith -Winline -Wcast= -qual =A0-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc =A0-I. -I/= src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inc= lude opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-gro= wth=3D100 --param large-function-growth=3D1000 =A0-mno-align-long-strings -= mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-s= se3 -ffreestanding -fstack-protector -Werror =A0/src/sys/xdr/xdr_mbuf.c > cc -c -O -pipe =A0-std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes =A0-Wmissing-prototypes -Wpointer-arith -Winline -Wcast= -qual =A0-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc =A0-I. -I/= src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inc= lude opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-gro= wth=3D100 --param large-function-growth=3D1000 =A0-mno-align-long-strings -= mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-s= se3 -ffreestanding -fstack-protector -Werror =A0/src/sys/xdr/xdr_mem.c > cc -c -O -pipe =A0-std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes =A0-Wmissing-prototypes -Wpointer-arith -Winline -Wcast= -qual =A0-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc =A0-I. -I/= src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inc= lude opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-gro= wth=3D100 --param large-function-growth=3D1000 =A0-mno-align-long-strings -= mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-s= se3 -ffreestanding -fstack-protector -Werror =A0/src/sys/xdr/xdr_reference.= c > cc -c -O -pipe =A0-std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes =A0-Wmissing-prototypes -Wpointer-arith -Winline -Wcast= -qual =A0-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc =A0-I. -I/= src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inc= lude opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-gro= wth=3D100 --param large-function-growth=3D1000 =A0-mno-align-long-strings -= mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-s= se3 -ffreestanding -fstack-protector -Werror =A0/src/sys/xdr/xdr_sizeof.c > cc -c -O -pipe =A0-std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes =A0-Wmissing-prototypes -Wpointer-arith -Winline -Wcast= -qual =A0-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc =A0-I. -I/= src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inc= lude opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-gro= wth=3D100 --param large-function-growth=3D1000 =A0-mno-align-long-strings -= mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-s= se3 -ffreestanding -fstack-protector -Werror =A0/src/sys/dev/arcmsr/arcmsr.= c > cc1: warnings being treated as errors > /src/sys/dev/arcmsr/arcmsr.c: In function 'arcmsr_action': > /src/sys/dev/arcmsr/arcmsr.c:2475: warning: cast from pointer to integer = of different size > *** Error code 1 > > Stop in /obj/i386.i386/src/sys/PAE. > *** Error code 1 > > Stop in /src. > *** Error code 1 Hi Xin Li! There's some bad casting being done for PAE's _bus.h vs this driver; the target data type is an 32-bit integer for non-PAE and 64-bit for PAE [1]: 37 #ifdef PAE 38 typedef uint64_t bus_addr_t; 39 #else 40 typedef uint32_t bus_addr_t; But the type that it's trying to assign the value to is an 8-byte integer (address) (!): 630 struct ccb_scsiio { 631 struct ccb_hdr ccb_h; 632 union ccb *next_ccb; /* Ptr for next CCB for actio= n */ 633 u_int8_t *req_map; /* Ptr to mapping info */ 634 u_int8_t *data_ptr; /* Ptr to the data buf/SG lis= t */ 635 u_int32_t dxfer_len; /* Data transfer length */ data_ptr might need to be dereferenced, but there are other sections in the code that pass (potentially by accident) today: /sys/dev/arcmsr/arcmsr.c: buffer =3D pccb->csio.data_ptr; /sys/dev/arcmsr/arcmsr.c: char *buffer=3Dpccb->csio.data_ptr; /sys/dev/arcmsr/arcmsr.c: , pccb->csio.data_ptr /sys/dev/arcmsr/arcmsr.c: seg.ds_addr =3D (bus_addr_t)pccb->csio.data_= ptr; /sys/dev/arcmsr/arcmsr.c: segs=3D(struct bus_dma_segment *)pccb->csio.data_ptr; There are some other minor issues with downcasting the integer in the driver as well: /sys/dev/arcmsr/arcmsr.c: address_lo=3Darcmsr_htole32(dma_addr_lo32(dm_se= gs[i].ds_addr)); /sys/dev/arcmsr/arcmsr.c: address_hi=3Darcmsr_htole32(dma_addr_hi32(dm_se= gs[i].ds_addr)); /sys/dev/arcmsr/arcmsr.c: seg.ds_addr =3D (bus_addr_t)pccb->csio.data_= ptr; /sys/dev/arcmsr/arcmsr.c: unsigned long srb_phyaddr=3D(unsigned long)segs->ds_addr; In particular, AFAICT the 4th assignment shown above is wrong on PAE (should be bus_addr_t, not unsigned long). Thanks! -Garrett