From owner-svn-src-all@FreeBSD.ORG Tue Nov 26 19:38:43 2013 Return-Path: Delivered-To: svn-src-all@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 ACE51652; Tue, 26 Nov 2013 19:38:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9C48927B3; Tue, 26 Nov 2013 19:38:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQJchAG007494; Tue, 26 Nov 2013 19:38:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQJchXv007492; Tue, 26 Nov 2013 19:38:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311261938.rAQJchXv007492@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Nov 2013 19:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258660 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:38:43 -0000 Author: kib Date: Tue Nov 26 19:38:42 2013 New Revision: 258660 URL: http://svnweb.freebsd.org/changeset/base/258660 Log: Hide struct pcb definition by #ifdef __amd64__ braces. If cc -m32 compilation results in inclusion of the header, a confict arises due to savefpu being union for i386, but used as struct in the pcb definition. The 32bit code should not need amd64 variant of the struct pcb anyway. For struct region_descriptor, use __uint64_t instead of unsigned long, as the base type for bit-fields. Unsigned long cannot have width 64 for -m32. The changes allowed to use sys/sysctl.h for cc -m32. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/pcb.h head/sys/amd64/include/segments.h Modified: head/sys/amd64/include/pcb.h ============================================================================== --- head/sys/amd64/include/pcb.h Tue Nov 26 19:14:18 2013 (r258659) +++ head/sys/amd64/include/pcb.h Tue Nov 26 19:38:42 2013 (r258660) @@ -43,6 +43,7 @@ #include #include +#ifdef __amd64__ struct pcb { register_t pcb_r15; register_t pcb_r14; @@ -105,6 +106,7 @@ struct pcb { uint64_t pcb_pad[3]; }; +#endif #ifdef _KERNEL struct trapframe; Modified: head/sys/amd64/include/segments.h ============================================================================== --- head/sys/amd64/include/segments.h Tue Nov 26 19:14:18 2013 (r258659) +++ head/sys/amd64/include/segments.h Tue Nov 26 19:38:42 2013 (r258660) @@ -82,8 +82,8 @@ struct soft_segment_descriptor { * region descriptors, used to load gdt/idt tables before segments yet exist. */ struct region_descriptor { - unsigned long rd_limit:16; /* segment extent */ - unsigned long rd_base:64 __packed; /* base address */ + uint64_t rd_limit:16; /* segment extent */ + uint64_t rd_base:64 __packed; /* base address */ } __packed; #ifdef _KERNEL