Re: [PATCH v4 10/25] nvdimm: Add driver for OpenCAPI Persistent Memory

2020-04-01 Thread Dan Williams
On Wed, Apr 1, 2020 at 1:49 AM Dan Williams wrote: > > On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva > wrote: > > > > This driver exposes LPC memory on OpenCAPI pmem cards > > as an NVDIMM, allowing the existing nvram infrastructure > > to be used. > > > > Namespace metadata is stored on

Re: [PATCH v4 10/25] nvdimm: Add driver for OpenCAPI Persistent Memory

2020-04-01 Thread Dan Williams
On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva wrote: > > This driver exposes LPC memory on OpenCAPI pmem cards > as an NVDIMM, allowing the existing nvram infrastructure > to be used. > > Namespace metadata is stored on the media itself, so > scm_reserve_metadata() maps 1 section's worth of

Re: [PATCH v4 10/25] nvdimm: Add driver for OpenCAPI Persistent Memory

2020-03-28 Thread Matthew Wilcox
On Sat, Mar 28, 2020 at 07:56:17PM -0700, Matthew Wilcox wrote: > On Fri, Mar 27, 2020 at 06:11:47PM +1100, Alastair D'Silva wrote: > > +static struct mutex minors_idr_lock; > > +static struct idr minors_idr; > ... > > + mutex_lock(_idr_lock); > > + minor = idr_alloc(_idr, ocxlpmem, 0,

Re: [PATCH v4 10/25] nvdimm: Add driver for OpenCAPI Persistent Memory

2020-03-28 Thread Matthew Wilcox
On Fri, Mar 27, 2020 at 06:11:47PM +1100, Alastair D'Silva wrote: > +static struct mutex minors_idr_lock; > +static struct idr minors_idr; ... > + mutex_lock(_idr_lock); > + minor = idr_alloc(_idr, ocxlpmem, 0, NUM_MINORS, GFP_KERNEL); > + mutex_unlock(_idr_lock); ... > +

[PATCH v4 10/25] nvdimm: Add driver for OpenCAPI Persistent Memory

2020-03-28 Thread Alastair D'Silva
This driver exposes LPC memory on OpenCAPI pmem cards as an NVDIMM, allowing the existing nvram infrastructure to be used. Namespace metadata is stored on the media itself, so scm_reserve_metadata() maps 1 section's worth of PMEM storage at the start to hold this. The rest of the PMEM range is