Re: [PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-22 Thread Dan Williams
On Tue, May 22, 2018 at 10:13 AM, Logan Gunthorpe wrote: > > > On 21/05/18 04:35 PM, Dan Williams wrote: >> + /* >> + * For device private memory we call add_pages() as we only need to >> + * allocate and initialize struct page for the device memory. More- >> +

Re: [PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-22 Thread Dan Williams
On Tue, May 22, 2018 at 10:13 AM, Logan Gunthorpe wrote: > > > On 21/05/18 04:35 PM, Dan Williams wrote: >> + /* >> + * For device private memory we call add_pages() as we only need to >> + * allocate and initialize struct page for the device memory. More- >> + * over the

Re: [PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-22 Thread Logan Gunthorpe
On 21/05/18 04:35 PM, Dan Williams wrote: > + /* > + * For device private memory we call add_pages() as we only need to > + * allocate and initialize struct page for the device memory. More- > + * over the device memory is un-accessible thus we do not want to > + * create

Re: [PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-22 Thread Logan Gunthorpe
On 21/05/18 04:35 PM, Dan Williams wrote: > + /* > + * For device private memory we call add_pages() as we only need to > + * allocate and initialize struct page for the device memory. More- > + * over the device memory is un-accessible thus we do not want to > + * create

Re: [PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-22 Thread Christoph Hellwig
On Mon, May 21, 2018 at 03:35:34PM -0700, Dan Williams wrote: > Commit e8d513483300 "memremap: change devm_memremap_pages interface to > use struct dev_pagemap" refactored devm_memremap_pages() to allow a > dev_pagemap instance to be supplied. Passing in a dev_pagemap interface > simplifies the

Re: [PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-22 Thread Christoph Hellwig
On Mon, May 21, 2018 at 03:35:34PM -0700, Dan Williams wrote: > Commit e8d513483300 "memremap: change devm_memremap_pages interface to > use struct dev_pagemap" refactored devm_memremap_pages() to allow a > dev_pagemap instance to be supplied. Passing in a dev_pagemap interface > simplifies the

[PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-21 Thread Dan Williams
Commit e8d513483300 "memremap: change devm_memremap_pages interface to use struct dev_pagemap" refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to

[PATCH 4/5] mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()

2018-05-21 Thread Dan Williams
Commit e8d513483300 "memremap: change devm_memremap_pages interface to use struct dev_pagemap" refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to