Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Benjamin Herrenschmidt
On Thu, 2018-04-05 at 19:25 -0700, Dan Williams wrote:
> > > Please also include my niggly nit picky trivial annoying bike shed
> > > color for the driver name to *not* use the "nd_region" suffix for a
> > > driver registering "nvdimm_bus" objects. "of_pmem_range" or
> > > "of_pmem_bus" or almost anything else would be fine.
> > 
> > Oh sure, would using of_pmem_region to match the compatible be ok?
> 
> That works for me.

The prefix "of" is not generally used in matching properties,...

my own pot of paint :)

Cheers,
Ben.



Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Dan Williams
On Thu, Apr 5, 2018 at 7:14 PM, Oliver  wrote:
>
> On Fri, Apr 6, 2018 at 12:43 AM, Dan Williams  
> wrote:
> > On Thu, Apr 5, 2018 at 5:43 AM, Oliver  wrote:
> >> On Thu, Apr 5, 2018 at 10:11 PM, Michael Ellerman  
> >> wrote:
> >>> Oliver  writes:
> >>> ...
> 
>  For context Balbir is working with me on some of the pmem stuff. You
>  probably want an Ack from Rob rather than one of us.
> >>>
> >>> I'll ack it if you make all the niggly nit picky trivial annoying
> >>> changes I asked for :D
> >>
> >> *groan*
> >>
> >> Fine, I'll respin it tomorrow. If anyone else has comments now would
> >> be the time to make them.
> >
> > Please also include my niggly nit picky trivial annoying bike shed
> > color for the driver name to *not* use the "nd_region" suffix for a
> > driver registering "nvdimm_bus" objects. "of_pmem_range" or
> > "of_pmem_bus" or almost anything else would be fine.
>
> Oh sure, would using of_pmem_region to match the compatible be ok?

That works for me.


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Oliver
On Fri, Apr 6, 2018 at 12:43 AM, Dan Williams  wrote:
> On Thu, Apr 5, 2018 at 5:43 AM, Oliver  wrote:
>> On Thu, Apr 5, 2018 at 10:11 PM, Michael Ellerman  
>> wrote:
>>> Oliver  writes:
>>> ...

 For context Balbir is working with me on some of the pmem stuff. You
 probably want an Ack from Rob rather than one of us.
>>>
>>> I'll ack it if you make all the niggly nit picky trivial annoying
>>> changes I asked for :D
>>
>> *groan*
>>
>> Fine, I'll respin it tomorrow. If anyone else has comments now would
>> be the time to make them.
>
> Please also include my niggly nit picky trivial annoying bike shed
> color for the driver name to *not* use the "nd_region" suffix for a
> driver registering "nvdimm_bus" objects. "of_pmem_range" or
> "of_pmem_bus" or almost anything else would be fine.

Oh sure, would using of_pmem_region to match the compatible be ok?


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Dan Williams
On Thu, Apr 5, 2018 at 5:43 AM, Oliver  wrote:
> On Thu, Apr 5, 2018 at 10:11 PM, Michael Ellerman  wrote:
>> Oliver  writes:
>> ...
>>>
>>> For context Balbir is working with me on some of the pmem stuff. You
>>> probably want an Ack from Rob rather than one of us.
>>
>> I'll ack it if you make all the niggly nit picky trivial annoying
>> changes I asked for :D
>
> *groan*
>
> Fine, I'll respin it tomorrow. If anyone else has comments now would
> be the time to make them.

Please also include my niggly nit picky trivial annoying bike shed
color for the driver name to *not* use the "nd_region" suffix for a
driver registering "nvdimm_bus" objects. "of_pmem_range" or
"of_pmem_bus" or almost anything else would be fine.


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Oliver
On Thu, Apr 5, 2018 at 10:11 PM, Michael Ellerman  wrote:
> Oliver  writes:
> ...
>>
>> For context Balbir is working with me on some of the pmem stuff. You
>> probably want an Ack from Rob rather than one of us.
>
> I'll ack it if you make all the niggly nit picky trivial annoying
> changes I asked for :D

*groan*

Fine, I'll respin it tomorrow. If anyone else has comments now would
be the time to make them.

>
> cheers


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Michael Ellerman
Oliver  writes:
...
>
> For context Balbir is working with me on some of the pmem stuff. You
> probably want an Ack from Rob rather than one of us.

I'll ack it if you make all the niggly nit picky trivial annoying
changes I asked for :D

cheers


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Oliver
On Thu, Apr 5, 2018 at 12:21 AM, Dan Williams  wrote:
> On Wed, Apr 4, 2018 at 7:04 AM, Oliver  wrote:
>> On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh  wrote:
>>> On Tue, 3 Apr 2018 10:37:51 -0700
>>> Dan Williams  wrote:
>>>
 On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran  wrote:
 > Add device-tree binding documentation for the nvdimm region driver.
 >
 > Cc: devicet...@vger.kernel.org
 > Signed-off-by: Oliver O'Halloran 
 > ---
 > v2: Changed name from nvdimm-region to pmem-region.
 > Cleaned up the example binding and fixed the overlapping regions.
 > Added support for multiple regions in a single reg.
 > ---
 >  .../devicetree/bindings/pmem/pmem-region.txt   | 80 
 > ++
 >  MAINTAINERS|  1 +
 >  2 files changed, 81 insertions(+)
 >  create mode 100644 
 > Documentation/devicetree/bindings/pmem/pmem-region.txt

 Device-tree folks, does this look, ok?

 Oliver, is there any concept of a management interface to the
 device(s) backing these regions? libnvdimm calls these "nmem" devices
 and support operations like health status and namespace label
 management.
>>
>> It's something I'm planning on implementing as soon as someone gives
>> me some hardware that isn't hacked up lab crap. I'm posting this
>> version with just regions since people have been asking for something
>> in upstream even if it's not fully featured.
>>
>> Grumbling aside, the plan is to have separate drivers for the DIMM
>> type. Discovering DIMM devices happens via the normal discovery
>> mechanisms (e.g. an NVDIMM supporting the JEDEC interface is an I2C
>> device) and when binding to a specific DIMM device it registers a DIMM
>> descriptor structure and a ndctl implementation for that DIMM type
>> with of_pmem. When of_pmem binds to a region it can plug everything
>> into the region specific bus. There's a few details to work out, but I
>> think it's a reasonable approach.
>
> Yeah, that sounds reasonable. It would mean that your management
> interface would need to understand that nmems on different buses could
> potentially move to another bus after a reconfiguration, but that's
> not too much different than the ACPI case where nmems can join and
> leave regions after a reset / reconfig.
>
>>> We would need a way to have nmem and pmem-regions find each other. Since we
>>> don't have the ACPI abstractions, the nmem region would need to add the
>>> ability for a driver to have a phandle to the interleaving and nmem 
>>> properties.
>>>
>>> I guess that would be a separate driver, that would manage the nmem devices
>>> and there would be a way to relate the pmem and nmems. Oliver?
>>
>> Yes, that's the plan.
>
> So Balbir, is that enough for an Acked-by for this device-tree proposal?

For context Balbir is working with me on some of the pmem stuff. You
probably want an Ack from Rob rather than one of us.


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Balbir Singh
On Wed, 4 Apr 2018 07:21:32 -0700
Dan Williams  wrote:

> On Wed, Apr 4, 2018 at 7:04 AM, Oliver  wrote:
> > On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh  
> > wrote:  
> >> On Tue, 3 Apr 2018 10:37:51 -0700
> >> Dan Williams  wrote:
> >>  
> >>> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran  
> >>> wrote:  
> >>> > Add device-tree binding documentation for the nvdimm region driver.
> >>> >
> >>> > Cc: devicet...@vger.kernel.org
> >>> > Signed-off-by: Oliver O'Halloran 
> >>> > ---
> >>> > v2: Changed name from nvdimm-region to pmem-region.
> >>> > Cleaned up the example binding and fixed the overlapping regions.
> >>> > Added support for multiple regions in a single reg.
> >>> > ---
> >>> >  .../devicetree/bindings/pmem/pmem-region.txt   | 80 
> >>> > ++
> >>> >  MAINTAINERS|  1 +
> >>> >  2 files changed, 81 insertions(+)
> >>> >  create mode 100644 
> >>> > Documentation/devicetree/bindings/pmem/pmem-region.txt  
> >>>
> >>> Device-tree folks, does this look, ok?
> >>>
> >>> Oliver, is there any concept of a management interface to the
> >>> device(s) backing these regions? libnvdimm calls these "nmem" devices
> >>> and support operations like health status and namespace label
> >>> management.  
> >
> > It's something I'm planning on implementing as soon as someone gives
> > me some hardware that isn't hacked up lab crap. I'm posting this
> > version with just regions since people have been asking for something
> > in upstream even if it's not fully featured.
> >
> > Grumbling aside, the plan is to have separate drivers for the DIMM
> > type. Discovering DIMM devices happens via the normal discovery
> > mechanisms (e.g. an NVDIMM supporting the JEDEC interface is an I2C
> > device) and when binding to a specific DIMM device it registers a DIMM
> > descriptor structure and a ndctl implementation for that DIMM type
> > with of_pmem. When of_pmem binds to a region it can plug everything
> > into the region specific bus. There's a few details to work out, but I
> > think it's a reasonable approach.  
> 
> Yeah, that sounds reasonable. It would mean that your management
> interface would need to understand that nmems on different buses could
> potentially move to another bus after a reconfiguration, but that's
> not too much different than the ACPI case where nmems can join and
> leave regions after a reset / reconfig.
> 
> >> We would need a way to have nmem and pmem-regions find each other. Since we
> >> don't have the ACPI abstractions, the nmem region would need to add the
> >> ability for a driver to have a phandle to the interleaving and nmem 
> >> properties.
> >>
> >> I guess that would be a separate driver, that would manage the nmem devices
> >> and there would be a way to relate the pmem and nmems. Oliver?  
> >
> > Yes, that's the plan.  
> 
> So Balbir, is that enough for an Acked-by for this device-tree proposal?

I don't see any major problems with the binding, but I think Oliver wanted
to send in a few clarifications based on a private discussion.

Balbir Singh.




Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Dan Williams
On Wed, Apr 4, 2018 at 7:04 AM, Oliver  wrote:
> On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh  wrote:
>> On Tue, 3 Apr 2018 10:37:51 -0700
>> Dan Williams  wrote:
>>
>>> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran  wrote:
>>> > Add device-tree binding documentation for the nvdimm region driver.
>>> >
>>> > Cc: devicet...@vger.kernel.org
>>> > Signed-off-by: Oliver O'Halloran 
>>> > ---
>>> > v2: Changed name from nvdimm-region to pmem-region.
>>> > Cleaned up the example binding and fixed the overlapping regions.
>>> > Added support for multiple regions in a single reg.
>>> > ---
>>> >  .../devicetree/bindings/pmem/pmem-region.txt   | 80 
>>> > ++
>>> >  MAINTAINERS|  1 +
>>> >  2 files changed, 81 insertions(+)
>>> >  create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt
>>>
>>> Device-tree folks, does this look, ok?
>>>
>>> Oliver, is there any concept of a management interface to the
>>> device(s) backing these regions? libnvdimm calls these "nmem" devices
>>> and support operations like health status and namespace label
>>> management.
>
> It's something I'm planning on implementing as soon as someone gives
> me some hardware that isn't hacked up lab crap. I'm posting this
> version with just regions since people have been asking for something
> in upstream even if it's not fully featured.
>
> Grumbling aside, the plan is to have separate drivers for the DIMM
> type. Discovering DIMM devices happens via the normal discovery
> mechanisms (e.g. an NVDIMM supporting the JEDEC interface is an I2C
> device) and when binding to a specific DIMM device it registers a DIMM
> descriptor structure and a ndctl implementation for that DIMM type
> with of_pmem. When of_pmem binds to a region it can plug everything
> into the region specific bus. There's a few details to work out, but I
> think it's a reasonable approach.

Yeah, that sounds reasonable. It would mean that your management
interface would need to understand that nmems on different buses could
potentially move to another bus after a reconfiguration, but that's
not too much different than the ACPI case where nmems can join and
leave regions after a reset / reconfig.

>> We would need a way to have nmem and pmem-regions find each other. Since we
>> don't have the ACPI abstractions, the nmem region would need to add the
>> ability for a driver to have a phandle to the interleaving and nmem 
>> properties.
>>
>> I guess that would be a separate driver, that would manage the nmem devices
>> and there would be a way to relate the pmem and nmems. Oliver?
>
> Yes, that's the plan.

So Balbir, is that enough for an Acked-by for this device-tree proposal?


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Oliver
On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh  wrote:
> On Tue, 3 Apr 2018 10:37:51 -0700
> Dan Williams  wrote:
>
>> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran  wrote:
>> > Add device-tree binding documentation for the nvdimm region driver.
>> >
>> > Cc: devicet...@vger.kernel.org
>> > Signed-off-by: Oliver O'Halloran 
>> > ---
>> > v2: Changed name from nvdimm-region to pmem-region.
>> > Cleaned up the example binding and fixed the overlapping regions.
>> > Added support for multiple regions in a single reg.
>> > ---
>> >  .../devicetree/bindings/pmem/pmem-region.txt   | 80 
>> > ++
>> >  MAINTAINERS|  1 +
>> >  2 files changed, 81 insertions(+)
>> >  create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt
>>
>> Device-tree folks, does this look, ok?
>>
>> Oliver, is there any concept of a management interface to the
>> device(s) backing these regions? libnvdimm calls these "nmem" devices
>> and support operations like health status and namespace label
>> management.

It's something I'm planning on implementing as soon as someone gives
me some hardware that isn't hacked up lab crap. I'm posting this
version with just regions since people have been asking for something
in upstream even if it's not fully featured.

Grumbling aside, the plan is to have separate drivers for the DIMM
type. Discovering DIMM devices happens via the normal discovery
mechanisms (e.g. an NVDIMM supporting the JEDEC interface is an I2C
device) and when binding to a specific DIMM device it registers a DIMM
descriptor structure and a ndctl implementation for that DIMM type
with of_pmem. When of_pmem binds to a region it can plug everything
into the region specific bus. There's a few details to work out, but I
think it's a reasonable approach.

> We would need a way to have nmem and pmem-regions find each other. Since we
> don't have the ACPI abstractions, the nmem region would need to add the
> ability for a driver to have a phandle to the interleaving and nmem 
> properties.
>
> I guess that would be a separate driver, that would manage the nmem devices
> and there would be a way to relate the pmem and nmems. Oliver?

Yes, that's the plan.


Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Balbir Singh
On Tue, 3 Apr 2018 10:37:51 -0700
Dan Williams  wrote:

> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran  wrote:
> > Add device-tree binding documentation for the nvdimm region driver.
> >
> > Cc: devicet...@vger.kernel.org
> > Signed-off-by: Oliver O'Halloran 
> > ---
> > v2: Changed name from nvdimm-region to pmem-region.
> > Cleaned up the example binding and fixed the overlapping regions.
> > Added support for multiple regions in a single reg.
> > ---
> >  .../devicetree/bindings/pmem/pmem-region.txt   | 80 
> > ++
> >  MAINTAINERS|  1 +
> >  2 files changed, 81 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt  
> 
> Device-tree folks, does this look, ok?
> 
> Oliver, is there any concept of a management interface to the
> device(s) backing these regions? libnvdimm calls these "nmem" devices
> and support operations like health status and namespace label
> management.

We would need a way to have nmem and pmem-regions find each other. Since we
don't have the ACPI abstractions, the nmem region would need to add the
ability for a driver to have a phandle to the interleaving and nmem properties.

I guess that would be a separate driver, that would manage the nmem devices
and there would be a way to relate the pmem and nmems. Oliver?

Balbir Singh.



Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-03 Thread Dan Williams
On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran  wrote:
> Add device-tree binding documentation for the nvdimm region driver.
>
> Cc: devicet...@vger.kernel.org
> Signed-off-by: Oliver O'Halloran 
> ---
> v2: Changed name from nvdimm-region to pmem-region.
> Cleaned up the example binding and fixed the overlapping regions.
> Added support for multiple regions in a single reg.
> ---
>  .../devicetree/bindings/pmem/pmem-region.txt   | 80 
> ++
>  MAINTAINERS|  1 +
>  2 files changed, 81 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt

Device-tree folks, does this look, ok?

Oliver, is there any concept of a management interface to the
device(s) backing these regions? libnvdimm calls these "nmem" devices
and support operations like health status and namespace label
management.