My recent change in this area weren't quite right. As a result non-kms pci video drivers might not have been working properly on various platforms. I just committed a fix for an issue where on i386/amd64 a write combining mapping would be requested even if it shouldn't.
Another issue is that the change broke other platforms that don't support write-combining. Since the define for the magic offset lives in <sys/memrange.h>, which exists for all platforms, it gets added for all platforms. But <sys/memrange.h> really only makes sense for i386/amd64. So one way to fix the issue is to only include it on those platforms. Other fixes are possible, like defining MEMRANGE_WC_RANGE to 0 on these platforms. Or not installing this header file at all on other platforms. opinions? ok? Index: src/openbsd_pci.c =================================================================== RCS file: /cvs/xenocara/lib/libpciaccess/src/openbsd_pci.c,v retrieving revision 1.25 diff -u -p -r1.25 openbsd_pci.c --- src/openbsd_pci.c 6 Jul 2015 12:49:35 -0000 1.25 +++ src/openbsd_pci.c 6 Jul 2015 12:55:53 -0000 @@ -16,7 +16,9 @@ #include <sys/param.h> #include <sys/ioctl.h> +#if defined(__i386__) || defined(__amd64__) #include <sys/memrange.h> +#endif #include <sys/mman.h> #include <sys/pciio.h> #include <sys/sysctl.h>
