bsd_pci.c have only one function osPciInit(). osPciInit() is equivalent call xf86InitVidMem(). xf86InitVidMem() is needed only for OpenBSD (see commit 06c0372c3a1b45005eb6d50406f77f4e93f1de1e)
For OpenBSD is defined osPciInit() = xf86InitVidMem() Signed-off-by: Alexandr Shadchin <alexandr.shadc...@gmail.com> --- configure.ac | 7 ---- hw/xfree86/os-support/bus/Makefile.am | 4 -- hw/xfree86/os-support/bus/Pci.h | 10 +++--- hw/xfree86/os-support/bus/bsd_pci.c | 55 --------------------------------- 4 files changed, 5 insertions(+), 71 deletions(-) delete mode 100644 hw/xfree86/os-support/bus/bsd_pci.c diff --git a/configure.ac b/configure.ac index 63d59f9..de957de 100644 --- a/configure.ac +++ b/configure.ac @@ -1582,7 +1582,6 @@ if test "x$XORG" = xyes; then dnl =================================================================== dnl ================= beginning of PCI configuration ================== dnl =================================================================== - xorg_bus_bsdpci=no xorg_bus_sparc=no AC_MSG_CHECKING([whether to build Xorg PCI functions]) @@ -1595,11 +1594,6 @@ if test "x$XORG" = xyes; then AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation]) AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path]) - case $host_os in - gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*) - xorg_bus_bsdpci="yes" - ;; - esac case $host_cpu in sparc*) xorg_bus_sparc="yes" @@ -1788,7 +1782,6 @@ if test "x$XORG" = xyes; then fi AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes]) -AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes]) AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes]) AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am index e09d4d2..d63cd89 100644 --- a/hw/xfree86/os-support/bus/Makefile.am +++ b/hw/xfree86/os-support/bus/Makefile.am @@ -6,10 +6,6 @@ if XORG_BUS_PCI PCI_SOURCES += Pci.c Pci.h endif -if XORG_BUS_BSDPCI -PCI_SOURCES += bsd_pci.c -endif - if XORG_BUS_SPARC PLATFORM_SOURCES = Sbus.c sdk_HEADERS += xf86Sbus.h diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index 88560ec..821de0d 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -137,12 +137,12 @@ #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) #define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u) -#if defined(linux) +#if defined(linux) || defined(__sun) || defined(__GNU__) || \ + defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__NetBSD__) || defined(__DragonFly__) #define osPciInit(x) do {} while (0) -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || \ - defined(__DragonFly__) || defined(__sun) || defined(__GNU__) -extern void osPciInit(void); +#elif defined(__OpenBSD__) +#define osPciInit(x) do { xf86InitVidMem(); } while (0) #else #error No PCI support available for this architecture/OS combination #endif diff --git a/hw/xfree86/os-support/bus/bsd_pci.c b/hw/xfree86/os-support/bus/bsd_pci.c deleted file mode 100644 index 7a5dbbb..0000000 --- a/hw/xfree86/os-support/bus/bsd_pci.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright © 2007 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Authors: - * Eric Anholt <e...@anholt.net> - * - */ - -/** - * @file bsd_pci.c - * - * This is a trivial implementation of the remaining PCI support hooks in the - * X Server that is unaware of domains. - * - * Most of even this should go away once drivers are converted and the - * old interfaces are confirmed to all be obsolete. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <stdio.h> -#include "compiler.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "Pci.h" - -#include "pciaccess.h" - -void -osPciInit(void) -{ - xf86InitVidMem(); -} -- 1.7.6 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel