From owner-freebsd-amd64@FreeBSD.ORG Fri Jan 31 07:10:01 2014 Return-Path: Delivered-To: freebsd-amd64@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52F84635 for ; Fri, 31 Jan 2014 07:10:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DF741131 for ; Fri, 31 Jan 2014 07:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0V7A1NB089795 for ; Fri, 31 Jan 2014 07:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0V7A1Uq089794; Fri, 31 Jan 2014 07:10:01 GMT (envelope-from gnats) Resent-Date: Fri, 31 Jan 2014 07:10:01 GMT Resent-Message-Id: <201401310710.s0V7A1Uq089794@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ivan Chetyrkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21D974BC for ; Fri, 31 Jan 2014 07:00:28 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E85AD10A4 for ; Fri, 31 Jan 2014 07:00:27 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0V70RcM017980 for ; Fri, 31 Jan 2014 07:00:27 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0V70RTv017959; Fri, 31 Jan 2014 07:00:27 GMT (envelope-from nobody) Message-Id: <201401310700.s0V70RTv017959@oldred.freebsd.org> Date: Fri, 31 Jan 2014 07:00:27 GMT From: Ivan Chetyrkin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: amd64/186291: Compilation fail when "device pst" in kernel config on amd64. X-Mailman-Approved-At: Fri, 31 Jan 2014 12:49:34 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jan 2014 07:10:01 -0000 >Number: 186291 >Category: amd64 >Synopsis: Compilation fail when "device pst" in kernel config on amd64. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 31 07:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Ivan Chetyrkin >Release: 10.0-STABLE >Organization: >Environment: FreeBSD v64.devel.local 10.0-STABLE FreeBSD 10.0-STABLE #0: Thu Jan 30 21:31:03 UTC 2014 root@v64.devel.local:/usr/obj/usr/src/sys/VBOX64 amd64 >Description: When trying to compile my own kernel with "device pst" in configuration file, process fail with message: cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror /usr/src/sys/dev/pst/pst-iop.c /usr/src/sys/dev/pst/pst-iop.c:197:3: error: cast to 'void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *)' from smaller integer type 'u_int32_t' (aka 'unsigned int') [-Werror,-Wint-to-pointer-cast] ((void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *)) ^ /usr/src/sys/dev/pst/pst-iop.c:419:9: error: cast to 'struct iop_request *' from smaller integer type 'u_int32_t' (aka 'unsigned int') [-Werror,-Wint-to-pointer-cast] (struct iop_request *)reply->transaction_context; ^ 2 errors generated. As we see from /usr/src/sys/dev/pst/pst-iop.h, initiator_context and transaction_context fields of driver message struct are declared as u_int32_t, which doesn't match pointer size on 64-bit processor. >How-To-Repeat: On amd64 machine include device pst in your config file and try compile kernel. >Fix: The controller is very old hardware and one of fix may be exclude it from available devices on amd64 platform. >Release-Note: >Audit-Trail: >Unformatted: