From owner-freebsd-scsi@FreeBSD.ORG Sun Nov 14 02:29:22 2010 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1158B1065670; Sun, 14 Nov 2010 02:29:22 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2AD8FC08; Sun, 14 Nov 2010 02:29:21 +0000 (UTC) Received: by iwn39 with SMTP id 39so5222896iwn.13 for ; Sat, 13 Nov 2010 18:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:received :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=ng4WBJYojUJalWaqmAiq6XqR9GK4Lzjl8shMsySyg0I=; b=RHs2WcxVkm+FMWksCAfVG0rct38U427QPNiL4CBw+bkD0igyh/s7PFBKsVY3bsa7IT qgZK5WDJMUnsGRNk3pvDUnznvqadpb1p7pfRRiov+YN85eGZrChpA4LMIw1ZRnyvxjOB Q2kLjL/eyJPwnZr6JQLYQBa/btxgx4UpJM4zo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=w2i548WQqqlLjoMy190i2XO0ZaCW0Z7Yt3mJiMnPyos5+JN47kBy5WpsKcODYmFbwR jOccifFlv/R7fMeiqk5220wv7qGFvLxVLYp5edTNiIAv9o+rJhkC6/dkt1iNnteK307V wLHQCRpydz2QYg729HVuqKz5H7Yothe0uH5zA= MIME-Version: 1.0 Received: by 10.231.36.11 with SMTP id r11mr3213840ibd.125.1289700061747; Sat, 13 Nov 2010 18:01:01 -0800 (PST) Received: by 10.231.213.195 with HTTP; Sat, 13 Nov 2010 18:01:01 -0800 (PST) Received: by 10.231.213.195 with HTTP; Sat, 13 Nov 2010 18:01:01 -0800 (PST) In-Reply-To: References: <201011132338.oADNcZkA035129@freebsd-current.sentex.ca> Date: Sat, 13 Nov 2010 18:01:01 -0800 Message-ID: From: Xin LI To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Attilio Rao , i386@freebsd.org, delphij@freebsd.org, scsi@freebsd.org Subject: Re: [head tinderbox] failure on i386/i386 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 02:29:22 -0000 Hmm, will fix ASAP, for some reason it passed my universe build on Friday :( On Nov 13, 2010 5:46 PM, "Garrett Cooper" wrote: > 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.sentex.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.sentex.ca /tinderbox/HEAD/i386/i386/supfile >> TB --- 2010-11-13 21:00:51 - building world >> TB --- 2010-11-13 21:00:51 - MAKEOBJDIRPREFIX=/obj >> TB --- 2010-11-13 21:00:51 - PATH=/usr/bin:/usr/sbin:/bin:/sbin >> TB --- 2010-11-13 21:00:51 - TARGET=i386 >> TB --- 2010-11-13 21:00:51 - TARGET_ARCH=i386 >> TB --- 2010-11-13 21:00:51 - TZ=UTC >> TB --- 2010-11-13 21:00:51 - __MAKE_CONF=/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=/obj >> TB --- 2010-11-13 22:46:32 - PATH=/usr/bin:/usr/sbin:/bin:/sbin >> TB --- 2010-11-13 22:46:32 - TARGET=i386 >> TB --- 2010-11-13 22:46:32 - TARGET_ARCH=i386 >> TB --- 2010-11-13 22:46:32 - TZ=UTC >> TB --- 2010-11-13 22:46:32 - __MAKE_CONF=/dev/null >> TB --- 2010-11-13 22:46:32 - cd /src >> TB --- 2010-11-13 22:46:32 - /usr/bin/make -B buildkernel KERNCONF=LINT >>>>> 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=/obj >> TB --- 2010-11-13 23:13:00 - PATH=/usr/bin:/usr/sbin:/bin:/sbin >> TB --- 2010-11-13 23:13:00 - TARGET=i386 >> TB --- 2010-11-13 23:13:00 - TARGET_ARCH=i386 >> TB --- 2010-11-13 23:13:00 - TZ=UTC >> TB --- 2010-11-13 23:13:00 - __MAKE_CONF=/dev/null >> TB --- 2010-11-13 23:13:00 - cd /src >> TB --- 2010-11-13 23:13:00 - /usr/bin/make -B buildkernel KERNCONF=GENERIC >>>>> 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=/obj >> TB --- 2010-11-13 23:33:39 - PATH=/usr/bin:/usr/sbin:/bin:/sbin >> TB --- 2010-11-13 23:33:39 - TARGET=i386 >> TB --- 2010-11-13 23:33:39 - TARGET_ARCH=i386 >> TB --- 2010-11-13 23:33:39 - TZ=UTC >> TB --- 2010-11-13 23:33:39 - __MAKE_CONF=/dev/null >> TB --- 2010-11-13 23:33:39 - cd /src >> TB --- 2010-11-13 23:33:39 - /usr/bin/make -B buildkernel KERNCONF=PAE >>>>> 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 -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /src/sys/xdr/xdr_mbuf.c >> cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /src/sys/xdr/xdr_mem.c >> cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /src/sys/xdr/xdr_reference.c >> cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /src/sys/xdr/xdr_sizeof.c >> cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /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 action */ > 633 u_int8_t *req_map; /* Ptr to mapping info */ > 634 u_int8_t *data_ptr; /* Ptr to the data buf/SG list */ > 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 = pccb->csio.data_ptr; > /sys/dev/arcmsr/arcmsr.c: char *buffer=pccb->csio.data_ptr; > /sys/dev/arcmsr/arcmsr.c: , pccb->csio.data_ptr > /sys/dev/arcmsr/arcmsr.c: seg.ds_addr = (bus_addr_t)pccb->csio.data_ptr; > /sys/dev/arcmsr/arcmsr.c: segs=(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=arcmsr_htole32(dma_addr_lo32(dm_segs[i].ds_addr)); > /sys/dev/arcmsr/arcmsr.c: address_hi=arcmsr_htole32(dma_addr_hi32(dm_segs[i].ds_addr)); > /sys/dev/arcmsr/arcmsr.c: seg.ds_addr = (bus_addr_t)pccb->csio.data_ptr; > /sys/dev/arcmsr/arcmsr.c: unsigned long srb_phyaddr=(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