This bug was filed by Julien Cristau at the Debian Bug Tracking system but never seemed to make it to fd.o's bugzilla.
> the pci_device_map_range() function from libpciaccess which is used by
> the X drivers to map pci BARs is implemented on linux using sysfs
> resourceN files, which the kernel only creates on architectures where
> HAVE_PCI_MMAP is defined. This is not the case for alpha, parisc, mips
> and m68k, as far as I can tell. See pci_create_resource_files() in
> linux/drivers/pci/pci-sysfs.c, and the respective include/asm-*/pci.h
> This means that future versions of X (starting with xorg-server 1.5) are
> not going to work on these architectures unless this is fixed. We need
> to either get the kernel fixed, or fall back to mmaping /dev/mem in
Is it really acceptable to switch to libpciaccess and provide no fallback for these platforms?
Ideally, the solution is that each platform implement sysfs-pci resource in the kernel, but in the real world, you file a bug detailing the ideal situation and it rots for 6 months (http://bugzilla.kernel.org/show_bug.cgi?id=10893). Even if that were fixed tomorrow, at least PA-RISC, MIPS, and M68K systems are still left in the cold. I believe the BSDs have also run into problems with this.
Please implement a fallback in libpciaccess (directly access /dev/mem or similar).
By implementing even a temporary fallback (until all the kernel implementations are finished), it appears that the following bugs (symptoms of this problem) would be instantly fixed.
bug 16549, bug 15521, bug 17801.
Ping, any updates here?
Is pci_device_linux_sysfs_map_legacy sufficient for the needs of drivers to
fallback on /dev/mem?
Alpha was fixed long ago. No one else seems to care (or their platforms have been fixed too)