Re: pci-sysfs resource mmap broken
From: Benjamin Herrenschmidt
Date: Tue Apr 26 2005 - 23:32:24 EST
On Tue, 2005-04-26 at 21:55 -0600, Grant Grundler wrote:
> 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.
Ok, we are crossing each other here, I was about to reply that you were
indeed right :) Anyway, I'm about to post another message explaining all
that I think I found and my proposed fix for ppc. Should be up as soon
as I have finished testing the patch.
> > 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.
True, but then, I tend to prefer you idea of a CPU view ... so my new
"proposal" is something like pci_resource_to_user() implementation.
Anyway, wait a bit so I can polish this patch and tell me what you
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/