Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2012 00:20:14 +0100
From:      Niclas Zeising <zeising@freebsd.org>
To:        Jim Harris <jimharris@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r243960 - in head/sys: amd64/include i386/include x86/include
Message-ID:  <50C66E2E.5040302@freebsd.org>
In-Reply-To: <201212062233.qB6MXWpP046167@svn.freebsd.org>
References:  <201212062233.qB6MXWpP046167@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/systm.h>
>  #include <x86/bus.h>
> +
> +#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 <sys/systm.h> 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 <machine/bus.h>
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!
-- 
Niclas Zeising



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50C66E2E.5040302>