[PATCH xserver 1/4] bsd: Remove bsd_pci.c

Alexandr Shadchin alexandr.shadchin at gmail.com
Sat Oct 29 11:36:31 PDT 2011


On Sat, Oct 29, 2011 at 10:13:48AM -0700, Alan Coopersmith wrote:
> On 10/29/11 08:54, Alexandr Shadchin wrote:
> >bsd_pci.c have only one function osPciInit(). osPciInit() is equivalent
> >call xf86InitVidMem(). xf86InitVidMem() is needed only for OpenBSD
> >(see commit 06c0372c3a1b45005eb6d50406f77f4e93f1de1e)
> 
> Pretty sure Solaris needs xf86InitVidMem too, though I'm not in a position
> to test today.   Any reason not to just set it to xf86InitVidMem for all
> the platforms that used to call it in bsd_pci.c ?
> 

Yes, it can be done, but main idea of adding xf86InitVidMem, that it was
necessary to share aperture_fd between xserver and libpciaccess (call
pci_system_init_dev_mem()). This is need (and implemented) only for OpenBSD.

As far as I can see, this is not necessary for Solaris, but I'll be happy
if you do test.

> >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
> 
> -- 
> 	-Alan Coopersmith-        alan.coopersmith at oracle.com
> 	 Oracle Solaris Platform Engineering: X Window System
> 

-- 
Alexandr Shadchin



More information about the xorg-devel mailing list