From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 8 01:05:07 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0969AEB for ; Thu, 8 Jan 2015 01:05:07 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1CBFBE2 for ; Thu, 8 Jan 2015 01:05:07 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t08157RI005190 for ; Thu, 8 Jan 2015 01:05:07 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196608] sys/x86/x86/busdma_machdep.c fails to compile with PAE Date: Thu, 08 Jan 2015 01:05:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 9.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mi@ALDAN.algebra.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 01:05:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196608 Bug ID: 196608 Summary: sys/x86/x86/busdma_machdep.c fails to compile with PAE Product: Base System Version: 9.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: mi@ALDAN.algebra.com Created attachment 151485 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151485&action=edit Add explicit cast to the assignment to work-around the problem Trying to build kernel with the 9.3-STABLE sources as of today, I get: cc -c -O -pipe -march=prescott -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 -nostdinc -I. -I/mi/src/sys -I/mi/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-sse -msoft-float -ffreestanding -Werror /mi/src/sys/x86/x86/busdma_machdep.c cc1: warnings being treated as errors /mi/src/sys/x86/x86/busdma_machdep.c: In function 'alloc_bounce_zone': /mi/src/sys/x86/x86/busdma_machdep.c:1041: warning: initialization from incompatible pointer type The same error from clang is easier to understand: /mi/src/sys/x86/x86/busdma_machdep.c:1041:2: error: incompatible pointer types initializing 'uint64_t *' (aka 'unsigned long long *') with an expression of type 'bus_size_t *' (aka 'unsigned int *') [-Werror,-Wincompatible-pointer-types] SYSCTL_ADD_BUS_SIZE_T(busdma_sysctl_tree(bz), ^ /mi/src/sys/x86/x86/busdma_machdep.c:968:31: note: expanded from macro 'SYSCTL_ADD_BUS_SIZE_T' #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD ^ /mi/src/sys/sys/sysctl.h:394:12: note: expanded from macro 'SYSCTL_ADD_UQUAD' uint64_t *__ptr = (ptr); \ Patching sysctl.h to add explicit cast to the above assignment -- as the attached patch is doing -- allows the build to succeed and the resulting kernel seems to work (I'm typing this, am I not?), but it is, probably, not right on some level... The r273912, probably, had something to do with this... -- You are receiving this mail because: You are the assignee for the bug.