Re: pci-sysfs resource mmap broken (and PATCH)
From: Grant Grundler
Date: Thu Apr 28 2005 - 18:36:45 EST
On Fri, Apr 29, 2005 at 08:47:27AM +1000, Benjamin Herrenschmidt wrote:
> > Well, if it's a device driver decision, I guess that's ok.
> > And the primary device driver happens to live in user space in X.org case.
> Agreed, but 1) Do you have an idea on how to expose this capability with
> the sysfs interface ? Adding ioctl's to it would suck big time :) and
I don't know enough about VM/TLB stuff to know the right answer.
I suspect the MAP_* attribute/hint needs to be passed in together
with the mmap call if any arch (ia64?) would return a different
virtual address depending the attribute (e.g cached vs uncached).
And write combining might be done in a "layer" below the CPU in
the HW hierarchy. e.g. PCI Host bus controller might combine writes
for some MMIO regions. I don't know if arch specific mmap support
can figure out which HW is the right one to enable write combining
in for a particular MMIO region or PCI device.
I generally don't work with graphics devices and only recently
started poking at infiniband support (128-512MB BAR depending
on card option) to understand really well how BAR is accessed/used.
> 2) It's still nice to have a "workaround" for existing X since the
> performance benefit is significant, but then, it's in arch code, so
> that's fine (and I could indeed limit it to VGA class devices as David
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/