public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: linux-pci@atrey.karlin.mff.cuni.cz,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>,
	bjorn.helgaas@hp.com
Subject: Re: pci-sysfs resource mmap broken
Date: Wed, 27 Apr 2005 14:30:21 +1000	[thread overview]
Message-ID: <1114576221.7182.140.camel@gaston> (raw)
In-Reply-To: <20050427035535.GI2612@colo.lackof.org>

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
think :)

Ben.



  reply	other threads:[~2005-04-27  4:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-26  5:33 pci-sysfs resource mmap broken Benjamin Herrenschmidt
2005-04-26  6:09 ` Benjamin Herrenschmidt
2005-04-26  6:36   ` Greg KH
2005-04-26  9:24   ` Russell King
2005-04-26 16:30 ` Grant Grundler
2005-04-26 22:47   ` Benjamin Herrenschmidt
2005-04-27  3:55     ` Grant Grundler
2005-04-27  4:30       ` Benjamin Herrenschmidt [this message]
2005-04-27  4:28         ` David S. Miller
2005-04-27  4:39           ` Benjamin Herrenschmidt
2005-04-27  4:46     ` pci-sysfs resource mmap broken (and PATCH) Benjamin Herrenschmidt
2005-04-27 23:13     ` Benjamin Herrenschmidt
2005-04-28  5:33       ` Grant Grundler
2005-04-28  5:37         ` David S. Miller
2005-04-28  6:39           ` Benjamin Herrenschmidt
2005-04-28  6:50             ` David S. Miller
2005-04-28  7:21               ` Benjamin Herrenschmidt
2005-04-28  7:22                 ` David S. Miller
2005-04-28  7:46                   ` Benjamin Herrenschmidt
2005-04-28 15:11               ` Grant Grundler
2005-04-28 22:47                 ` Benjamin Herrenschmidt
2005-04-28 23:38                   ` Grant Grundler
2005-04-29 15:42                     ` David S. Miller
2005-04-29 22:16                       ` Jesse Barnes
2005-04-28  6:35         ` Benjamin Herrenschmidt
2005-05-03  5:37           ` pci-sysfs resource mmap broken PATCH#2 Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1114576221.7182.140.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=greg@kroah.com \
    --cc=grundler@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox