[PATCH v2 25/25] pmem: convert to generic memremap

From
Dan Williams <hidden>
Date
2015-07-26 18:11:47
Also in
linux-arch, lkml, nvdimm
Reply to
Christoph Hellwig, 2015-07-26
On Sun, Jul 26, 2015 at 10:33 AM, Christoph Hellwig [off-list ref] wrote:
On Fri, Jul 24, 2015 at 10:40:20PM -0400, Dan Williams wrote:
quoted
Update memremap_pmem() to query the architecture for the mapping type of
the given persistent memory range  and then pass those flags to generic
memremap().  arch_memremap_pmem_flags() is provided an address range to
evaluate in the event an arch has a need for different mapping types by
address range.  For example the ACPI NFIT carries EFI mapping types in
its memory range description table.
I don't think the pmem driver should look at a arch hook here, please
communicate this through the nvdimm subsystem.

Btw, looking at these changes I also think the __pmem annotations
are mistake.  We might have all kinds of ways to write to pmem,
and as long as we properly flush it we don't need to force it
through the special accessors.  This becomes really interesting
for PCI DMA access.
I don't follow.  We have __iomem for the cpu mapping of a resource and
dma_map() for a PCI device.  __pmem works the same and is there to
make sure someone doesn't simply de-reference a pointer to pmem and
hope that the write is persistent.
Thread (67 messages) 67 messages, 10 authors, last reply 2016-04-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help