From owner-svn-src-all@FreeBSD.ORG Tue Dec 11 00:19:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C6047BA; Tue, 11 Dec 2012 00:19:59 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 9D6938FC14; Tue, 11 Dec 2012 00:19:58 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id EBBB140003; Tue, 11 Dec 2012 01:19:57 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id E06DC40005; Tue, 11 Dec 2012 01:19:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (h-45-105.a163.priv.bahnhof.se [94.254.45.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 3444D40003; Tue, 11 Dec 2012 01:19:56 +0100 (CET) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3YL1xm07LXz8hVt; Tue, 11 Dec 2012 01:19:56 +0100 (CET) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([10.1.0.3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [10.1.0.6]) (amavisd-new, port 10025) with ESMTPS id hMiSGTdE9ni2; Tue, 11 Dec 2012 01:19:53 +0100 (CET) Received: from mail.daemonic.se (mail.daemonic.se [10.1.0.4]) by mx.daemonic.se (Postfix) with ESMTPS id 3YL1xj45N8z8hVm; Tue, 11 Dec 2012 01:19:53 +0100 (CET) Received: from vivi.daemonic.se (vivi.daemonic.se [10.32.0.4]) by mail.daemonic.se (Postfix) with ESMTPSA id 3YL1xj3gjNz9CwY; Tue, 11 Dec 2012 01:19:53 +0100 (CET) Message-ID: <50C67C29.4070408@freebsd.org> Date: Tue, 11 Dec 2012 01:19:53 +0100 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Carl Delsey 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> <50C6764E.4040804@intel.com> In-Reply-To: <50C6764E.4040804@intel.com> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: svn-src-head@freebsd.org, Jim Harris , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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, 11 Dec 2012 00:19:59 -0000 On 12/11/12 00:54, Carl Delsey wrote: > 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. Sounds good to me, thank you very much! Don't forget to ifdef the include o as well as the KASSERTs. Regards! -- Niclas Zeising