lkml.org 
[lkml]   [2015]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants
From
Date
On Thu, 2015-06-25 at 02:08 +0200, Luis R. Rodriguez wrote:
>
> OK thanks I'll proceed with these patches then.
>
> > As for user mappings,
>
> Which APIs were you considering in this regard BTW?

mmap of the generic /sys/bus/pci/.../resource*

> > maybe the right thing to do is to let us do what we do by
> > default with a quirk that can set a flag in pci_dev to disable that
> > behaviour (maybe on a per BAR basis ?).
>
> That might mean it could restrict userspace WC to require devices
> to have WC parts on a full PCI BAR. Although this is restrictive
> having reviewed most WC uses in the kernel I'd think this would be
> a fair compromise to make, but again, if things are still murky
> perhaps best we kiss this idea good bye for now and hope for it
> to come in on future buses or ammendments (if that's even possible?).
>
> > I think the common case is that WC works.
>
> If WC does not I will note one hack which migh be worth mentioning --
> just for
> the record, this was devised as a shortcoming of a device where they
> failed to
> split things properly and that *without* WC performance suffered quite
> a bit so
> they made one full PCI BAR WC and as a work around this:
>
> http://lkml.kernel.org/r/20150416041837.GA5712@hykim-PC
>
> That is for registers that needed it:
>
> write; wmb;
>
> Then if they wanted to wait till the NIC has seen the write, they did:
>
> write; wmb; read;
>

Right, and as I mentioned, on some archs like powerpc (and possibly
more), writel() and co contains an implicit mb()

> Luis--




\
 
 \ /
  Last update: 2015-06-25 03:01    [W:0.093 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site