From owner-svn-src-head@FreeBSD.ORG Mon Dec 10 23:54:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1111E94C; Mon, 10 Dec 2012 23:54:56 +0000 (UTC) (envelope-from carl.r.delsey@intel.com) Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by mx1.freebsd.org (Postfix) with ESMTP id AE6448FC17; Mon, 10 Dec 2012 23:54:55 +0000 (UTC) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 10 Dec 2012 15:54:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,254,1355126400"; d="scan'208";a="179160694" Received: from crdelsey-fbsd.ch.intel.com (HELO [10.2.105.127]) ([10.2.105.127]) by AZSMGA002.ch.intel.com with ESMTP; 10 Dec 2012 15:54:54 -0800 Message-ID: <50C6764E.4040804@intel.com> Date: Mon, 10 Dec 2012 16:54:54 -0700 From: Carl Delsey User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120724 Thunderbird/13.0.1 MIME-Version: 1.0 To: Niclas Zeising Subject: Re: svn commit: r243960 - in head/sys: amd64/include i386/include x86/include References: <201212062233.qB6MXWpP046167@svn.freebsd.org> <50C66E2E.5040302@freebsd.org> <50C67129.6090704@intel.com> <50C672D0.9090908@freebsd.org> In-Reply-To: <50C672D0.9090908@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Jim Harris , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2012 23:54:56 -0000 On 12/10/12 16:40, Niclas Zeising wrote: > On 12/11/12 00:32, Carl Delsey wrote: >> On 12/10/12 16:20, Niclas Zeising wrote: >>> On 12/06/12 23:33, Jim Harris wrote: >>>> Author: jimharris >>>> Date: Thu Dec 6 22:33:31 2012 >>>> New Revision: 243960 >>>> URL: http://svnweb.freebsd.org/changeset/base/243960 >>>> >>>> Log: >>>> Add amd64 implementations for 8-byte bus_space routines. >>>> +#include >>>> #include >>>> + >>>> +#define KASSERT_BUS_SPACE_MEM_ONLY(tag) \ >>>> + KASSERT((tag) == X86_BUS_SPACE_MEM, \ >>>> + ("%s: can only handle mem space", __func__)) >>>> + >>>> +static __inline uint64_t >>>> +bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t bsh, >>>> + bus_size_t ofs) >>>> +{ >>>> + >>>> + KASSERT_BUS_SPACE_MEM_ONLY(tag); >>>> + >>>> + return (*(volatile uint64_t *)(bsh + ofs)); >>>> +} >>> Hi! >>> Can the include of and the added KASSERTs please be hidden >>> under #ifdef _KERNEL or something similar? devel/libpciaccess from the >>> experimental xorg-dev tree >>> (http://trillian.chruetertee.ch/ports/browser/trunk/devel/libpciaccess) >>> uses machine/bus.h on amd64 and i386 to be able to read/write to the pci >>> bus, and this change breaks the compile of devel/libpciaccess. >>> It is probably so that libpciaccess is wrong in using >>> but I have no idea how to fix it. If you have a better suggestion on >>> how to fix libpciaccess I am all ears. >>> Regards! >> Does libpciaccess make use of the bus_space_read/write_* routines in >> these files, or does it just use some constants and types from them? >> > libpciaccess uses bus_space_[read,write]_[1,2,4], which are defined in > x86/bus.h. It does not use the quad functions. > Regards! Ok. In that case I won't ifdef out the functions themselves, just the KASSERT in case libpciaccess expands in the future to 8 byte accesses :-) I had another related change in the works. I'll add this change in. Thanks, Carl