From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A706C2035BA04 for ; Tue, 19 Dec 2017 06:59:02 -0800 (PST) Date: Tue, 19 Dec 2017 16:03:47 +0100 From: Christoph Hellwig Subject: Re: [PATCH 16/17] memremap: change devm_memremap_pages interface to use struct dev_pagemap Message-ID: <20171219150347.GC13124@lst.de> References: <20171215140947.26075-1-hch@lst.de> <20171215140947.26075-17-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dan Williams Cc: "linux-nvdimm@lists.01.org" , X86 ML , "linux-kernel@vger.kernel.org" , Linux MM , =?iso-8859-1?B?Suly9G1l?= Glisse , linuxppc-dev , Christoph Hellwig List-ID: On Sun, Dec 17, 2017 at 10:51:56AM -0800, Dan Williams wrote: > On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > > From: Logan Gunthorpe > > > > This new interface is similar to how struct device (and many others) > > work. The caller initializes a 'struct dev_pagemap' as required > > and calls 'devm_memremap_pages'. This allows the pagemap structure to > > be embedded in another structure and thus container_of can be used. In > > this way application specific members can be stored in a containing > > struct. > > > > This will be used by the P2P infrastructure and HMM could probably > > be cleaned up to use it as well (instead of having it's own, similar > > 'hmm_devmem_pages_create' function). > > > > Signed-off-by: Logan Gunthorpe > > Signed-off-by: Christoph Hellwig > > Looks good, I notice that this does not initialize pgmap->type to > MEMORY_DEVICE_HOST, but since that value is zero and likely won't > change we're ok. I'll add it jut for clarity. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm