Re: [PATCH v2 1/4] libnvdimm: fix memmory leaks in of_pmem.c

2020-08-19 Thread Oliver O'Halloran
Lei Yep, that's a bug. Reviewed-by: Oliver O'Halloran > --- > drivers/nvdimm/of_pmem.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c > index 10dbdcdfb9ce913..1292ffca7b2ecc0 100644 > --- a/drivers/nvdimm/of_pmem.c >

Re: [PATCH v2 1/4] libnvdimm: Fix memory leaks in of_pmem.c

2020-08-19 Thread Oliver O'Halloran
On Wed, Aug 19, 2020 at 10:28 PM Markus Elfring wrote: > > > The memory priv->bus_desc.provider_name allocated by kstrdup() is not > > freed correctly. Personally I thought his commit message was perfectly fine. A little unorthodox, but it works. > How do you think about to choose an imperative

Re: [PATCH v4 00/25] Add support for OpenCAPI Persistent Memory devices

2020-04-01 Thread Oliver O'Halloran
gt; > https://github.com/open-power/skiboot/blob/master/hw/npu2-opencapi.c#L2328 I'm not sure I'd encourage anyone to read npu2-opencapi.c. I find it hard enough to follow even with access to the workbooks. There's an OPAL call API reference here: http://open-power.github.io/skiboot/doc/opal-api

Re: [PATCH v3 00/27] Add support for OpenCAPI Persistent Memory devices

2020-02-23 Thread Oliver O'Halloran
rgue about. However, as Matthew pointed out, it is at odds with how most subsystems operate. Is there any particular reason we're doing things this way or should we think about moving libnvdimm users to drivers/nvdimm/? Oliver ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 1/2] libnvdimm/of_pmem: handle memory-region in DT

2020-02-23 Thread Oliver O'Halloran
se cases where the pmem region is > > not in I/O address space or dedicated memory (e.g. a bootloader > > carveout). > > > > Signed-off-by: Kenny Root > > Signed-off-by: Alistair Delva > > Cc: "Oliver O'Halloran" > > Cc: Rob Herring > > Cc: Da

Re: [PATCH 1/2] libnvdimm/of_pmem: handle memory-region in DT

2020-02-23 Thread Oliver O'Halloran
(e.g. a bootloader > carveout). > > Signed-off-by: Kenny Root > Signed-off-by: Alistair Delva > Cc: "Oliver O'Halloran" > Cc: Rob Herring > Cc: Dan Williams > Cc: Vishal Verma > Cc: Dave Jiang > Cc: Ira Weiny > Cc: devicet...@vger.kernel.org

Re: [PATCH 09/10] powerpc: Enable OpenCAPI Storage Class Memory driver on bare metal

2019-10-27 Thread Oliver O'Halloran
On Fri, Oct 25, 2019 at 3:51 PM Alastair D'Silva wrote: > > From: Alastair D'Silva > > Enable OpenCAPI Storage Class Memory driver on bare metal > > Signed-off-by: Alastair D'Silva > --- > arch/powerpc/configs/powernv_defconfig | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [PATCH 2/2] powerpc/nvdimm: Update vmemmap_populated to check sub-section range

2019-09-16 Thread Oliver O'Halloran
On Tue, Sep 10, 2019 at 4:29 PM Aneesh Kumar K.V wrote: > > With commit: 7cc7867fb061 ("mm/devm_memremap_pages: enable sub-section remap") > pmem namespaces are remapped in 2M chunks. On architectures like ppc64 we > can map the memmap area using 16MB hugepage size and that can cover > a memory

Re: [PATCH 2/3] of_pmem: Add memory ranges which took a mce to bad range

2019-08-20 Thread Oliver O'Halloran
the arch code into a more generic notifier chain that libnvdimm use. There's probably other uses in mm/ for such a chain too. Oliver > Signed-off-by: Santosh Sivaraj > --- > drivers/nvdimm/of_pmem.c | 151 +-- > 1 file changed, 131 insert

Re: [PATCH 2/2] mm/dax: Don't enable huge dax mapping by default

2019-03-20 Thread Oliver
On Thu, Mar 21, 2019 at 7:57 AM Dan Williams wrote: > > On Wed, Mar 20, 2019 at 8:34 AM Dan Williams wrote: > > > > On Wed, Mar 20, 2019 at 1:09 AM Aneesh Kumar K.V > > wrote: > > > > > > Aneesh Kumar K.V writes: > > > > > > > Dan Williams writes: > > > > > > > >> > > > >>> Now what will be

Re: [RFC PATCH] drivers/nvdimm: Architecture specific abstraction for pfn device alignment

2019-03-05 Thread Oliver
rch specific > callbacks/abstraction for finding alignment values we should use when > configuring > pfn device. > > Cc: Oliver O'Halloran > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/libnvdimm.h | 10 ++ > arch/powerpc/mm/Makefile

[PATCH] libnvdimm: Fix altmap reservation size calculation

2019-02-05 Thread Oliver O'Halloran
e pfn setup to the core") Signed-off-by: Oliver O'Halloran --- --- drivers/nvdimm/pfn_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c index 6f22272e8d80..9b9be83da0e7 100644 --- a/drivers/nvdimm/pfn_devs.c +++

[PATCH] ndctl: Fixes for building without keyutils

2019-02-05 Thread Oliver O'Halloran
Fixes for some build errors when ndctl is configured without keyutils support. Signed-off-by: Oliver O'Halloran --- Ran into this when making a test buildroot image. This is probably not going to be an issue if you're compiling on a real OS. --- ndctl/ndctl.c | 2 ++ ndctl/util/keys.h | 2

[PATCH v5 7/7] ndctl: Add supported_alignments to the JSON output

2019-01-30 Thread Oliver O'Halloran
Add the list of supported alignemnts to PFN and DAX namespaces. Also add the list of supported sector sizes to BTT namespaces. Signed-off-by: Oliver O'Halloran --- v5: Added again. The supported_size array is now only included in the verbose JSON output. This means it won't be included

[PATCH v5 6/7] ndctl/namespace: Make the create-region JSON output non-verbose

2019-01-30 Thread Oliver O'Halloran
ourselves to add more fields in the future. This patch also makes the 'sector_size' field non-verbose since the BTT unit tests require it. Signed-off-by: Oliver O'Halloran --- Ccurrently `ndctl list` has the -v flag to make the output more verbose, however every other ndctl command uses -v a

[PATCH v5 2/7] ndctl/namespace: Check for seed namespaces earlier

2019-01-30 Thread Oliver O'Halloran
When creating an fsdax or devdax namespace we need to verify that the seed namespaces exist. This patch reworks the validation so that it's done earlier to simplify the subsequent patches in the series. Signed-off-by: Oliver O'Halloran --- No functional changes, I hope. v3: Don't fail early

[PATCH v5 4/7] ndctl/namespace: Validate alignment from the {pfn|dax} seed

2019-01-30 Thread Oliver O'Halloran
This patch adds support to the ndctl tool for validating that the namespace alignment is valid. Signed-off-by: Oliver O'Halloran --- v3: Fail validation if an alignment is specified, but pfn mode is not supported. --- ndctl/namespace.c | 37 + 1 file

[PATCH v5 5/7] ndctl: Add alignment to the namespace JSON output

2019-01-30 Thread Oliver O'Halloran
Automated tooling probably wants to know this and it's helpful output for command line users for ndctl. Signed-off-by: Oliver O'Halloran --- util/json.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/util/json.c b/util/json.c index 5c3424e2a707..77c96fb53c27 100644 --- a/util

[PATCH v5 3/7] ndctl/namespace: Use seed alignment as the default

2019-01-30 Thread Oliver O'Halloran
the alignment of the relevant seed namespace as the default instead. The kernel will always pick a valid default alignment so this should be a bit more portable. Signed-off-by: Oliver O'Halloran --- v3: Only use the pfn seed for the default alignment if there is a pfn seed. --- ndctl/namespace.c

[PATCH v5 1/7] libndctl: Use the supported_alignment attribute

2019-01-30 Thread Oliver O'Halloran
_alignment(), and ndctl_{dax|pfn}_get_num_alignments() Signed-off-by: Oliver O'Halloran --- v5: Fixed comment wording v4: Changed return code of ndctl_pfn_get_supported_alignment from -1 to -1 to -EINVAL. Reworded comment about why we default to 4K and 2M alignments when the sysfs

[PATCH] libndctl, dimm: Don't require an xlat function

2019-01-30 Thread Oliver O'Halloran
nipulation commands work anymore, unless you happen to be using an Intel DIMM. Cc: Vishal Verma Fixes: 62bbfce3cb62 ("libndctl, intel: Add infrastructure for firmware_status translation") Signed-off-by: Oliver O'Halloran --- ndctl/lib/libndctl.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH v4 2/5] ndctl/namespace: Check for seed namespaces earlier

2019-01-29 Thread Oliver O'Halloran
When creating an fsdax or devdax namespace we need to verify that the seed namespaces exist. This patch reworks the validation so that it's done earlier to simplify the subsequent patches in the series. Signed-off-by: Oliver O'Halloran --- No functional changes, I hope. v3: Don't fail early

[PATCH v4 4/5] ndctl/namespace: Validate alignment from the {pfn|dax} seed

2019-01-29 Thread Oliver O'Halloran
This patch adds support to the ndctl tool for validating that the namespace alignment is valid. Signed-off-by: Oliver O'Halloran --- v3: Fail validation if an alignment is specified, but pfn mode is not supported. --- ndctl/namespace.c | 37 + 1 file

[PATCH v4 5/5] ndctl: Add alignment to the namespace JSON output

2019-01-29 Thread Oliver O'Halloran
Automated tooling probably wants to know this and it's helpful output for command line users for ndctl. Signed-off-by: Oliver O'Halloran --- util/json.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/util/json.c b/util/json.c index 5c3424e2a707..77c96fb53c27 100644 --- a/util

[PATCH v4 3/5] ndctl/namespace: Use seed alignment as the default

2019-01-29 Thread Oliver O'Halloran
the alignment of the relevant seed namespace as the default instead. The kernel will always pick a valid default alignment so this should be a bit more portable. Signed-off-by: Oliver O'Halloran --- v3: Only use the pfn seed for the default alignment if there is a pfn seed. --- ndctl/namespace.c

[PATCH v4 1/5] libndctl: Use the supported_alignment attribute

2019-01-29 Thread Oliver O'Halloran
_alignment(), and ndctl_{dax|pfn}_get_num_alignments() Signed-off-by: Oliver O'Halloran --- v4: Changed return code of ndctl_pfn_get_supported_alignment from -1 to -1 to -EINVAL. Reworded comment about why we default to 4K and 2M alignments when the sysfs attribute is missing.

Re: [PATCH v3 6/6] ndctl: Add supported_alignments to the JSON output

2019-01-29 Thread Oliver
On Wed, Jan 16, 2019 at 8:49 PM Oliver O'Halloran wrote: > > Add the list of supported alignemnts to PFN and DAX namespaces. Also add the > list of supported sector sizes to BTT namespaces. > > Signed-off-by: Oliver O'Halloran > --- > Not sure the namespace JSON blob are

Re: [PATCH v3 1/6] libndctl: Use the supported_alignment attribute

2019-01-28 Thread Oliver
On Tue, Jan 29, 2019 at 10:15 AM Verma, Vishal L wrote: > > > On Tue, 2019-01-29 at 10:11 +1100, Oliver wrote: > > On Thu, Jan 24, 2019 at 6:32 AM Verma, Vishal L > > wrote: > > > > > > On Wed, 2019-01-16 at 20:49 +1100, Oliver O'Hallor

Re: [PATCH v3 1/6] libndctl: Use the supported_alignment attribute

2019-01-28 Thread Oliver
On Thu, Jan 24, 2019 at 6:32 AM Verma, Vishal L wrote: > > > On Wed, 2019-01-16 at 20:49 +1100, Oliver O'Halloran wrote: > > Newer kernels provide the "supported_alignments" sysfs attribute that > > indicates what alignments can be used with a PFN or DAX

[PATCH v3 1/6] libndctl: Use the supported_alignment attribute

2019-01-16 Thread Oliver O'Halloran
_alignment(), and ndctl_{dax|pfn}_get_num_alignments() Signed-off-by: Oliver O'Halloran --- v3: Changed the return type of the *_get_supported_alignment() functions to unsigned long to match the existing *_get_alignment() functions. --- ndctl/lib/libndct

[PATCH v3 3/6] ndctl/namespace: Use seed alignment as the default

2019-01-16 Thread Oliver O'Halloran
the alignment of the relevant seed namespace as the default instead. The kernel will always pick a valid default alignment so this should be a bit more portable. Signed-off-by: Oliver O'Halloran --- ndctl/namespace.c | 96 +-- 1 file changed, 43 insertions

[PATCH v3 2/6] ndctl/namespace: Check for seed namespaces earlier

2019-01-16 Thread Oliver O'Halloran
When creating an fsdax or devdax namespace we need to verify that the seed namespaces exist. This patch reworks the validation so that it's done earlier to simplify the subsequent patches in the series. Signed-off-by: Oliver O'Halloran --- No functional changes, probably. --- ndctl/namespace.c

[PATCH v3 5/6] ndctl: Add alignment to the namespace JSON output

2019-01-16 Thread Oliver O'Halloran
Automated tooling probably wants to know this and it's helpful output for command line users for ndctl. Signed-off-by: Oliver O'Halloran --- util/json.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/util/json.c b/util/json.c index 5c3424e2a707..77c96fb53c27 100644 --- a/util

Re: [PATCH 2/4] ndctl/namespace: Check for seed namespaces earlier

2019-01-08 Thread Oliver
On Tue, Jan 8, 2019 at 1:59 PM Dan Williams wrote: > > Sorry for letting this conversation go cold, lets try to revive it as > Vishal is looking to cut an ndctl v64 in the coming days and it would > be good to include this support. > > On Tue, Nov 27, 2018 at 5:27 AM Oliver wro

Re: [PATCH 2/4] ndctl/namespace: Check for seed namespaces earlier

2018-11-27 Thread Oliver
On Mon, Nov 26, 2018 at 7:12 AM Dan Williams wrote: > > On Mon, Nov 19, 2018 at 12:11 AM Oliver O'Halloran wrote: > > > > When creating an fsdax or devdax namespace we need to verify that the > > seed namespaces exist. This patch reworks the validation so that it's >

[PATCH 2/4] ndctl/namespace: Check for seed namespaces earlier

2018-11-19 Thread Oliver O'Halloran
When creating an fsdax or devdax namespace we need to verify that the seed namespaces exist. This patch reworks the validation so that it's done earlier to simplify the subsequent patches in the series. No functional changes. Signed-off-by: Oliver O'Halloran --- ndctl/namespace.c | 51

[PATCH 4/4] ndctl/namespace: Validate alignment from the {pfn|dax} seed

2018-11-19 Thread Oliver O'Halloran
This patch adds support to the ndctl tool for validating that the namespace alignment is valid. Signed-off-by: Oliver O'Halloran --- ndctl/namespace.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/ndctl/namespace.c b/ndctl/namespace.c

[PATCH 1/4] libndctl: Use the supported_alignment attribute

2018-11-19 Thread Oliver O'Halloran
_alignment(), and ndctl_{dax|pfn}_get_num_alignments() Signed-off-by: Oliver O'Halloran --- ndctl/lib/libndctl.c | 40 ndctl/lib/libndctl.sym | 7 +++ ndctl/libndctl.h | 6 ++ 3 files changed, 53 insertions(+) diff --git a/ndctl/lib/li

[PATCH 3/4] ndctl/namespace: Use seed alignment as the default

2018-11-19 Thread Oliver O'Halloran
the alignment of the relevant seed namespace as the default instead. The kernel will always pick a valid default alignment so this should be a bit more portable. Signed-off-by: Oliver O'Halloran --- ndctl/namespace.c | 96 +-- 1 file changed, 43 insertions

Re: [PATCH] libnvdimm: Provide a simplified nvdimm_create() for non-security enabled DIMMs

2018-10-14 Thread Oliver
On Sun, Oct 14, 2018 at 3:35 AM Dan Williams wrote: > > Do not require libnvdimm provider implementations to include security > parameters if the bus / dimm-devices do not have that support. > > Cc: Oliver O'Halloran > Cc: Michael Ellerman > Signed-off-by: Dan Williams

Re: [PATCH v3 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-14 Thread Oliver
On Mon, Oct 15, 2018 at 10:44 AM Dan Williams wrote: > > On Sun, Oct 14, 2018 at 4:19 PM Oliver O'Halloran wrote: > > > > Adds a driver that implements support for enabling and accessing PAPR > > SCM regions. Unfortunately due to how the PAPR interface works we can't >

[PATCH v3 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-14 Thread Oliver O'Halloran
This patch implements support for discovering storage class memory devices at boot and for handling hotplug of new regions via RTAS hotplug events. Signed-off-by: Oliver O'Halloran --- v2: Added missing pmem.c v3: no changes --- arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc

[PATCH v3 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-14 Thread Oliver O'Halloran
address space, and b) There is currently no mechanism for relating a bare of_pmem region to the backing DIMM (or not-a-DIMM for our case). Both of these are easily handled by rolling the functionality into a seperate driver so here we are... Acked-by: Dan Williams Signed-off-by: Oliver

Re: [PATCH 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-14 Thread Oliver
On Sat, Oct 13, 2018 at 9:37 AM Dan Williams wrote: > > On Tue, Oct 9, 2018 at 11:21 PM Oliver O'Halloran wrote: > > > > Adds a driver that implements support for enabling and accessing PAPR > > SCM regions. Unfortunately due to how the PAPR interface works we can't >

Re: [PATCH 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-10 Thread Oliver
On Thu, Oct 11, 2018 at 3:36 AM Nathan Fontenot wrote: > > On 10/10/2018 01:08 AM, Oliver O'Halloran wrote: > > This patch implements support for discovering storage class memory > > devices at boot and for handling hotplug of new regions via RTAS > > hotplug events. >

PAPR SCM support

2018-10-10 Thread Oliver O'Halloran
This series adds support for the para-virtualised storage class memory interface defined by the Power Architecture Platform Reference. Patch 1 implements the pseries device discovery (via DT) and hotplug support (via RTAS hotplug interrupt). Patch 2 implements a driver that binds to the platform

[PATCH 2/2] powerpc/pseries: Add driver for PAPR SCM regions

2018-10-10 Thread Oliver O'Halloran
address space, and b) There is currently no mechanism for relating a bare of_pmem region to the backing DIMM (or not-a-DIMM for our case). Both of these are easily handled by rolling the functionality into a seperate driver so here we are... Signed-off-by: Oliver O'Halloran --- The alternative

[PATCH 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-10 Thread Oliver O'Halloran
This patch implements support for discovering storage class memory devices at boot and for handling hotplug of new regions via RTAS hotplug events. Signed-off-by: Oliver O'Halloran --- arch/powerpc/include/asm/firmware.h | 3 ++- arch/powerpc/include/asm/hvcall.h | 10

[PATCH v3 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-05 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[PATCH v3 2/4] libnvdimm: Add device-tree based driver

2018-04-05 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for persistent memory regions. The driver registers a libnvdimm bus for each pmem-region node and each address range under the node is converted to a region within that bus. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Made ea

[PATCH v3 3/4] doc/devicetree: Persistent memory region bindings

2018-04-05 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Changed name from nvdimm-region to pmem-region. Cleaned up the example binding and fixed the overlapping regions. Added s

[PATCH v3 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2018-04-05 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

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 <dan.j.willi...@intel.com> wrote: > On Thu, Apr 5, 2018 at 5:43 AM, Oliver <ooh...@gmail.com> wrote: >> On Thu, Apr 5, 2018 at 10:11 PM, Michael Ellerman <m...@ellerman.id.au> >> wrote: >

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 <m...@ellerman.id.au> wrote: > Oliver <ooh...@gmail.com> 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. > >

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 <dan.j.willi...@intel.com> wrote: > On Wed, Apr 4, 2018 at 7:04 AM, Oliver <ooh...@gmail.com> wrote: >> On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh <bsinghar...@gmail.com> wrote: >>> On Tue, 3 Apr 2018 10:37:51

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 <bsinghar...@gmail.com> wrote: > On Tue, 3 Apr 2018 10:37:51 -0700 > Dan Williams <dan.j.willi...@intel.com> wrote: > >> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >>

[RESEND v2 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2018-04-03 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

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

2018-04-03 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Changed name from nvdimm-region to pmem-region. Cleaned up the example binding and fixed the overlapping regions. Added s

[RESEND v2 2/4] libnvdimm: Add device-tree based driver

2018-04-03 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for persistent memory regions. The driver registers a libnvdimm bus for each pmem-region node and each address range under the node is converted to a region within that bus. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- v2: Made ea

[RESEND v2 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-03 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

Re: [PATCH 6/6] doc/devicetree: NVDIMM region documentation

2018-03-28 Thread Oliver
On Thu, Mar 29, 2018 at 4:06 AM, Rob Herring <r...@kernel.org> wrote: > On Tue, Mar 27, 2018 at 9:53 AM, Oliver <ooh...@gmail.com> wrote: >> On Tue, Mar 27, 2018 at 9:24 AM, Rob Herring <r...@kernel.org> wrote: >>> On Fri, Mar 23, 2018 at 07:12:09PM +1100, Oliv

Re: [PATCH 6/6] doc/devicetree: NVDIMM region documentation

2018-03-27 Thread Oliver
On Tue, Mar 27, 2018 at 9:24 AM, Rob Herring <r...@kernel.org> wrote: > On Fri, Mar 23, 2018 at 07:12:09PM +1100, Oliver O'Halloran wrote: >> Add device-tree binding documentation for the nvdimm region driver. >> >> Cc: devicet...@vger.kernel.org >> Sign

Re: [PATCH 3/6] libnvdimm: Add device-tree based driver

2018-03-25 Thread Oliver
On Sat, Mar 24, 2018 at 4:07 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Fri, Mar 23, 2018 at 1:12 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> This patch adds peliminary device-tree bindings for the NVDIMM driver. > > *preliminary > >>

[PATCH 6/6] doc/devicetree: NVDIMM region documentation

2018-03-23 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- .../devicetree/bindings/nvdimm/nvdimm-region.txt | 45 ++ 1 file changed, 45 insertions(+) create mode

[PATCH 5/6] powerpc/powernv: Create platform devs for nvdimm buses

2018-03-23 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[PATCH 2/6] libnvdimm: Add nd_region_destroy()

2018-03-23 Thread Oliver O'Halloran
Currently there's no way to remove a region from and nvdimm_bus without tearing down the whole bus. This patch adds an API for removing a single region from the bus so that we can implement a sensible unbind operation for the of_nd_region platform driver. Signed-off-by: Oliver O'Halloran <

[PATCH 1/6] libnvdimm: Add of_node to region and bus descriptors

2018-03-23 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

[PATCH 3/6] libnvdimm: Add device-tree based driver

2018-03-23 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for the NVDIMM driver. Currently this only supports one bus (created at probe time) which all regions are added to with individual regions being created by a platform device driver. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- I s

[PATCH 4/6] libnvdimm/of: Symlink platform and region devices

2018-03-23 Thread Oliver O'Halloran
Add a way direct link between the region and the platform device that creates the region. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- drivers/nvdimm/of_nvdimm.c | 11 +++ drivers/nvdimm/region_devs.c | 13 + include/linux/libnvdimm.h| 1 + 3 files c

Re: [PATCH v2 07/10] nvme-pci: Use PCI p2pmem subsystem to manage the CMB

2018-03-06 Thread Oliver
On Tue, Mar 6, 2018 at 12:14 PM, Logan Gunthorpe <log...@deltatee.com> wrote: > > On 05/03/18 05:49 PM, Oliver wrote: >> >> It's in arch/powerpc/kernel/io.c as _memcpy_toio() and it has two full >> barriers! >> >> Awesome! >> >> Our io.h indi

[PATCH] kernel/memremap: Remove stale devres_free() call

2018-03-05 Thread Oliver O'Halloran
devm_memremap_pages() fail gracefully. Fixes: e8d513483300 ("memremap: change devm_memremap_pages interface to use struct dev_pagemap") Cc: Logan Gunthorpe <log...@deltatee.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Dan Williams <dan.j.willi...@intel.com> Signed-off-by: Oliver

Re: [PATCH v2 07/10] nvme-pci: Use PCI p2pmem subsystem to manage the CMB

2018-03-05 Thread Oliver
On Tue, Mar 6, 2018 at 4:10 AM, Logan Gunthorpe <log...@deltatee.com> wrote: > > > On 05/03/18 09:00 AM, Keith Busch wrote: >> >> On Mon, Mar 05, 2018 at 12:33:29PM +1100, Oliver wrote: >>> >>> On Thu, Mar 1, 2018 at 10:40 AM, Logan Gunthorpe <log.

Re: [PATCH v2 07/10] nvme-pci: Use PCI p2pmem subsystem to manage the CMB

2018-03-04 Thread Oliver
On Thu, Mar 1, 2018 at 10:40 AM, Logan Gunthorpe wrote: > Register the CMB buffer as p2pmem and use the appropriate allocation > functions to create and destroy the IO SQ. > > If the CMB supports WDS and RDS, publish it for use as p2p memory > by other devices. > >

Re: [PATCH 1/3] libnvdimm: Add of_node to region and bus descriptors

2017-11-15 Thread Oliver
On Thu, Nov 16, 2017 at 5:05 AM, Dan Williams <dan.j.willi...@gmail.com> wrote: > On Wed, Nov 15, 2017 at 9:51 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> We want to be able to cross reference the region and bus devices >> with the device tree node that they w

[PATCH 2/3] libnvdimm: Add a device-tree interface

2017-11-15 Thread Oliver O'Halloran
A fairly bare-bones set of device-tree bindings so libnvdimm can be used on powerpc and other device-tree based platforms. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- .../devicetree/bindings/nvdimm/nvdimm-bus.txt | 69 +++ MAINT

[PATCH 3/3] powerpc/powernv: Create platform devs for nvdimm buses

2017-11-15 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/p

[PATCH 1/3] libnvdimm: Add of_node to region and bus descriptors

2017-11-15 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran <

Re: [PATCH] daxctl: remove libpmem dependency

2017-11-09 Thread Oliver
On Fri, Nov 10, 2017 at 1:40 AM, wrote: > From: Ɓukasz Plewa > > The next version of libpmem will depend on libndctl - as daxctl > depends on libpmem, it will make building packages inconvenient. > This patch replaces libpmem calls with intrinsic

Re: [PATCH 2/3] libnvdimm, pfn, dax: show supported dax/pfn region alignments in sysfs

2017-08-15 Thread Oliver
On Wed, Aug 16, 2017 at 1:47 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Mon, Aug 14, 2017 at 11:46 PM, Oliver <ooh...@gmail.com> wrote: >> On Tue, Aug 15, 2017 at 4:02 PM, kbuild test robot <l...@intel.com> wrote: > [..] >>

Re: [PATCH 2/3] libnvdimm, pfn, dax: show supported dax/pfn region alignments in sysfs

2017-08-15 Thread Oliver
On Tue, Aug 15, 2017 at 4:02 PM, kbuild test robot <l...@intel.com> wrote: > Hi Oliver, > > [auto build test ERROR on linux-nvdimm/libnvdimm-for-next] > [also build test ERROR on v4.13-rc5 next-20170811] > [if your patch is applied to the wrong git tree, please drop us a no

Re: [PATCH] libnvdimm: Stop using HPAGE_SIZE

2017-07-10 Thread Oliver
On Tue, Jul 11, 2017 at 9:44 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Tue, Jun 27, 2017 at 2:56 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> Currently libnvdimm uses HPAGE_SIZE as the default alignment for DAX and >> PFN devices. HPAGE_SIZE is the

Re: [RFC 1/4] libnvdimm: add to_{nvdimm,nd_region}_dev()

2017-07-10 Thread Oliver
On Tue, Jul 11, 2017 at 9:53 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Tue, Jun 27, 2017 at 3:28 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> struct device contains the ->of_node pointer so that devices can be >> assoicated with the device-tre

Re: [PATCH] libnvdimm: show supported dax/pfn region alignments in sysfs

2017-07-10 Thread Oliver
On Tue, Jul 11, 2017 at 9:40 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Tue, Jun 27, 2017 at 2:56 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> The alignment of a DAX and PFN regions dictates the page sizes that can >> be used to map the region. Even

Re: [PATCH v4 12/16] libnvdimm, nfit: enable support for volatile ranges

2017-07-05 Thread Oliver
On Thu, Jul 6, 2017 at 12:11 PM, h...@lst.de wrote: > On Wed, Jul 05, 2017 at 07:08:54PM -0700, Dan Williams wrote: >> [ adding Jeff, and Johannes ] >> >> On Wed, Jul 5, 2017 at 6:17 PM, Kani, Toshimitsu wrote: >> > On Wed, 2017-07-05 at 17:07 -0700, Dan Williams

Re: [RFC 2/4] libnvdimm: Add a device-tree interface

2017-06-27 Thread Oliver
> > On Tue, Jun 27, 2017 at 08:28:49PM +1000, Oliver O'Halloran wrote: >> A fairly bare-bones set of device-tree bindings so libnvdimm can be used >> on powerpc and other, less cool, device-tree based platforms. > > ;) > >> Cc: devicet...@vger.kernel.org &

[RFC 3/4] powerpc: Add pmem API support

2017-06-27 Thread Oliver O'Halloran
-off-by: Oliver O'Halloran <ooh...@gmail.com> --- This should go on to of the ZONE_DEVICE patches. If you want a full tree there's one here that's based on next-20170626 with Dan's libnvdimm-pending branch merged in: https://github.com/oohal/linux/tree/ppc-nvdimm-4.13 --- arch/powerpc/K

[RFC 1/4] libnvdimm: add to_{nvdimm,nd_region}_dev()

2017-06-27 Thread Oliver O'Halloran
imm driver to set the of_node pointer. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- drivers/nvdimm/dimm_devs.c | 6 ++ drivers/nvdimm/region_devs.c | 6 ++ include/linux/libnvdimm.h| 2 ++ 3 files changed, 14 insertions(+) diff --git a/drivers/nvdimm/dimm_devs.c

[RFC 2/4] libnvdimm: Add a device-tree interface

2017-06-27 Thread Oliver O'Halloran
A fairly bare-bones set of device-tree bindings so libnvdimm can be used on powerpc and other, less cool, device-tree based platforms. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- The current bindings are essentially this: nonvolatile-

[PATCH] libnvdimm: show supported dax/pfn region alignments in sysfs

2017-06-27 Thread Oliver O'Halloran
the alignments that should be used with these region types. This patch adds the 'supported_alignments' region attribute to expose this information to userspace. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- drivers/nvdimm/pfn_devs.c | 28 1 file chang

[PATCH] libnvdimm: Stop using HPAGE_SIZE

2017-06-27 Thread Oliver O'Halloran
and it happens to match the vmemmap allocation block on x86 and Power. It's still a hack, but it's a slightly nicer hack. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- drivers/nvdimm/nd.h | 7 +++ drivers/nvdimm/pfn_devs.c | 9 + 2 files changed, 12 insertions

[PATCH 4/4] ndctl, create-namespace: use seed device to check alignments

2017-06-27 Thread Oliver O'Halloran
so that the valid alignments are what the seed device supports. It also uses the seed device alignment as the default alignment since this is chosen by the kernel and should be a reasonable default. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- ndctl/namespace.

[PATCH 3/4] libndctl: Add helpers to check supported sector sizes

2017-06-27 Thread Oliver O'Halloran
: ndctl_namespace_supports_sector_size() ndctl_btt_supports_sector_size() Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- ndctl/lib/libndctl.c | 12 ndctl/lib/libndctl.sym | 2 ++ ndctl/libndctl.h.in| 3 +++ ndctl/namespace.c

[PATCH 2/4] libndctl: Parse supported_alignments for dax and pfn devices

2017-06-27 Thread Oliver O'Halloran
Newer kernels advertise the list of alignments that they support through sysfs. This patch adds parsing inside of libndctl to determine the alignments the kernel supports for PFN and DAX regions. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- ndctl/lib/libndctl.c

Re: [PATCH] nvdimm: Export supported alignments via sysfs

2017-05-03 Thread Oliver O'Halloran
On Wed, May 3, 2017 at 2:17 PM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Tue, May 2, 2017 at 8:25 PM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> On Wed, May 3, 2017 at 7:57 AM, Dan Williams <dan.j.willi...@intel.com> >> wrote: >>> On Fri, A

Re: [PATCH] nvdimm: Export supported alignments via sysfs

2017-05-02 Thread Oliver O'Halloran
On Wed, May 3, 2017 at 7:57 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Fri, Apr 28, 2017 at 12:31 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >> On Fri, Apr 28, 2017 at 1:59 AM, Dan Williams <dan.j.willi...@intel.com> >> wrote: >>&g

Re: [PATCH] nvdimm: Export supported alignments via sysfs

2017-04-27 Thread Oliver O'Halloran
On Fri, Apr 28, 2017 at 2:18 AM, Dan Williams <dan.j.willi...@intel.com> wrote: > On Thu, Apr 27, 2017 at 8:59 AM, Dan Williams <dan.j.willi...@intel.com> > wrote: >> On Thu, Apr 27, 2017 at 2:15 AM, Oliver O'Halloran <ooh...@gmail.com> wrote: >>> Adds tw

[PATCH] nvdimm: Export supported alignments via sysfs

2017-04-27 Thread Oliver O'Halloran
Adds two new sysfs attributes for pfn (and dax) devices: supported_alignements and default_alignment. These advertise to userspace what alignments this kernel supports, and provides a nominal default alignment to use. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- I'm not sure it

[PATCH 3/4] ndctl, create-namespace: use seed device to check dax alignment

2017-04-27 Thread Oliver O'Halloran
-by: Oliver O'Halloran <ooh...@gmail.com> --- ndctl/builtin-xaction-namespace.c | 79 +-- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/ndctl/builtin-xaction-namespace.c b/ndctl/builtin-xaction-namespace.c index 46d651e86153..4fdf50ef785a

[PATCH 1/4] ndctl: rename parse_lbasize to parse_sizes

2017-04-27 Thread Oliver O'Halloran
We want to re-use this code to parse the list of supported alignments for dax and PFN devices so rename the function to reflect the more generic usage. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- ndctl/lib/libndctl.c | 20 ++-- 1 file changed, 10 insertions(

[PATCH 4/4] ndctl: print alignment for dax and pfn devs

2017-04-27 Thread Oliver O'Halloran
It's handy to know. Doubly so if the user didn't supply an alignment. Signed-off-by: Oliver O'Halloran <ooh...@gmail.com> --- util/json.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/util/json.c b/util/json.c index d6a8d4c899ed..f454163df0e9 100644 --- a/util/json.c +++

  1   2   >