Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1172569

Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants

From Benjamin Herrenschmidt <benh@kernel.crashing.org>
Newsgroups linux.kernel
Subject Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants
Date 2015-06-26 04:50 +0200
Message-ID <pFrSh-2wg-5@gated-at.bofh.it> (permalink)
References <pDcNH-3Pi-3@gated-at.bofh.it> <pF2Ay-82Y-13@gated-at.bofh.it> <pFgWS-3SG-25@gated-at.bofh.it> <pFohI-5Jn-11@gated-at.bofh.it> <pFnbY-4dP-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2015-06-25 at 21:40 +0000, Casey Leedom wrote:
> 
> Ah, thanks.  I see now that the __raw_*() APIs don't do any of the
> Endian Swizzling.  Unfortunately the *_relaxed() APIs on PowerPC
> are just defined as the normal *() routines.  From
> arch/powerpc/include/asm/io.h:
> 
>     /*
>      * We don't do relaxed operations yet, at least not with this
> semantic
>      */

Yes so I was looking at this but there are some difficulties.
Architecturally, even with I=1 G=1 mappings (normal ioremap), we have no
guarantee of ordering of load vs. store unless I misunderstood
something. I think all current implementations provide some of that but
without barriers in the accessors, we aren't architecturally correct.

However, having those barriers will cause issues with G=0 (write
combine). It's unclear whether eieio() will provide the required
ordering for I=1 G=0 mappings and it will probably break write combine.

I'm looking into it with our HW guys and will try to come up with a
solution for power, but it doesn't help that our memory model conflates
write combining with other relaxations and that all our barriers also
prevent write combine.

Maybe we can bias the relaxed accessors toward write, by having no
barriers in it, and putting extra ones in reads.

Cheers,
Ben.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants "Luis R. Rodriguez" <mcgrof@suse.com> - 2015-06-25 00:30 +0200
  Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-06-25 01:50 +0200
    Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants "Luis R. Rodriguez" <mcgrof@suse.com> - 2015-06-25 02:10 +0200
      Re: [Xen-devel] [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants "Luis R. Rodriguez" <mcgrof@suse.com> - 2015-06-25 03:00 +0200
        Re: [Xen-devel] [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-06-25 03:20 +0200
      Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-06-25 03:00 +0200
    RE: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Casey Leedom <leedom@chelsio.com> - 2015-06-25 23:50 +0200
      Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-06-26 01:00 +0200
        Re: [Xen-devel] [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-06-27 02:20 +0200
      Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-06-26 04:50 +0200
        Re: [PATCH v7 5/9] PCI: Add pci_iomap_wc() variants Casey Leedom <leedom@chelsio.com> - 2015-07-03 02:20 +0200

csiph-web