Re: pci-sysfs resource mmap broken

From: Grant Grundler
Date: Tue Apr 26 2005 - 22:54:24 EST


On Wed, Apr 27, 2005 at 08:47:34AM +1000, Benjamin Herrenschmidt wrote:
> No. I don't agree. userspace has no business understanding the kernel
> resources content.

Sorry - you are right. Userspace doesn't need to understand kernel
resources. It just needs some sort of handle so it can talk
to the device in whatever way is appropriate. I was thinking
the resource content (which happens to be CPU View of a BAR)
could be that handle.

...
> The only thing I dislike a bit is that forces me to read the BAR on
> every access to "un-offset" the kernel resource. We may be able to have
> some arch hook do that properly, but for now, that would fix the problem
> and make the whole stuff work again.


What is wrong with reading the BAR?
Is the "IO View" needed in the performance path someplace?

It should be trivial since config space is exported via /sys and /proc.
libpci probably already has everything that's needed.

grant
-
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/