Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755293AbbGZSLr (ORCPT ); Sun, 26 Jul 2015 14:11:47 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:35053 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755206AbbGZSLp (ORCPT ); Sun, 26 Jul 2015 14:11:45 -0400 MIME-Version: 1.0 In-Reply-To: <20150726173317.GD29513@lst.de> References: <20150725023649.8664.59145.stgit@dwillia2-desk3.amr.corp.intel.com> <20150725024020.8664.52581.stgit@dwillia2-desk3.amr.corp.intel.com> <20150726173317.GD29513@lst.de> Date: Sun, 26 Jul 2015 11:11:44 -0700 Message-ID: Subject: Re: [PATCH v2 25/25] pmem: convert to generic memremap From: Dan Williams To: Christoph Hellwig Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-arch@vger.kernel.org, "Kani, Toshimitsu" , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , Russell King , Ross Zwisler , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 27 On Sun, Jul 26, 2015 at 10:33 AM, Christoph Hellwig wrote: > On Fri, Jul 24, 2015 at 10:40:20PM -0400, Dan Williams wrote: >> 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. -- 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/