[PATCH 1/2] ocxl: Remove unnecessary externs

2020-04-14 Thread Alastair D'Silva
Function declarations don't need externs, remove the existing ones so they are consistent with newer code Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Acked-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 40 ++--- include/misc/ocxl.h

[PATCH 2/2] ocxl: Address kernel doc errors & warnings

2020-04-14 Thread Alastair D'Silva
This patch addresses warnings and errors from the kernel doc scripts for the OpenCAPI driver. It also makes minor tweaks to make the docs more consistent. Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c| 24 drivers/misc/ocxl

[PATCH 0/2] powerpc: OpenCAPI Cleanup

2020-04-14 Thread Alastair D'Silva
These patches address checkpatch & kernel doc warnings in the OpenCAPI infrastructure. Alastair D'Silva (2): ocxl: Remove unnecessary externs ocxl: Address kernel doc errors & warnings arch/powerpc/include/asm/pnv-ocxl.h | 40 ++- drivers/misc/ocxl/config.c

RE: [PATCH v4 08/25] ocxl: Emit a log message showing how much LPC memory was detected

2020-04-02 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:49 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; A

RE: [PATCH v4 07/25] ocxl: Add functions to map/unmap LPC memory

2020-04-02 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:49 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; A

RE: [PATCH v4 03/25] powerpc/powernv: Map & release OpenCAPI LPC memory

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:49 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; A

RE: [PATCH v4 02/25] mm/memory_hotplug: Allow check_hotplug_memory_addressable to be called from drivers

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; A

RE: [PATCH v4 01/25] powerpc/powernv: Add OPAL calls for LPC memory alloc/release

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; A

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

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; A

[PATCH v4 22/25] nvdimm/ocxl: Add debug IOCTLs

2020-03-31 Thread Alastair D'Silva
These IOCTLs provide low level access to the card to aid in debugging controller/FPGA firmware. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/Kconfig| 6 + drivers/nvdimm/ocxl/main.c | 198 + drivers/nvdimm/ocxl/ocxlpmem.h | 2 +- include

[PATCH v4 17/25] nvdimm/ocxl: Add controller dump IOCTLs

2020-03-31 Thread Alastair D'Silva
used for the dump Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 161 + include/uapi/nvdimm/ocxlpmem.h | 16 2 files changed, 177 insertions(+) diff --git a/drivers/nvdimm/ocxl/main.c b/drivers/nvdimm/ocxl/main.c index e6be0029f658..d0db358d

[PATCH v4 16/25] nvdimm/ocxl: Implement the Read Error Log command

2020-03-31 Thread Alastair D'Silva
OCTL. Userspace is notified of pending error logs in a later patch ("powerpc/powernv/pmem: Forward events to userspace") Signed-off-by: Alastair D'Silva --- .../userspace-api/ioctl/ioctl-number.rst | 1 + drivers/nvdimm/ocxl/main.c| 240 ++ inclu

[PATCH v4 18/25] nvdimm/ocxl: Add an IOCTL to report controller statistics

2020-03-31 Thread Alastair D'Silva
The controller can report a number of statistics that are useful in evaluating the performance and reliability of the card. This patch exposes this information via an IOCTL. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 220 + include/uapi

[PATCH v4 23/25] nvdimm/ocxl: Expose SMART data via ndctl

2020-03-31 Thread Alastair D'Silva
This patch retrieves proprietary formatted SMART data and makes it available via ndctl. A later contribution will be made to ndctl to parse this data. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 113 + drivers/nvdimm/ocxl/ocxlpmem.h | 18

[PATCH v4 19/25] nvdimm/ocxl: Forward events to userspace

2020-03-31 Thread Alastair D'Silva
to receive notifications of these interrupts. Userspace can then identify what events have occurred by calling SCM_IOCTL_EVENT_CHECK and checking against the SCM_IOCTL_EVENT_FOO masks. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 220 + drivers

[PATCH v4 15/25] nvdimm/ocxl: Register a character device for userspace to interact with

2020-03-30 Thread Alastair D'Silva
This patch introduces a character device (/dev/ocxlpmemX) which further patches will use to interact with userspace, such as error logs, controller stats and card debug functionality. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 117

[PATCH v4 06/25] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2020-03-30 Thread Alastair D'Silva
OpenCAPI LPC memory is allocated per link, but each link supports multiple AFUs, and each AFU can have LPC memory assigned to it. This patch tallys the memory for all AFUs on a link, allowing it to be mapped in a single operation after the AFUs have been enumerated. Signed-off-by: Alastair

[PATCH v4 12/25] nvdimm/ocxl: Add register addresses & status values to the header

2020-03-30 Thread Alastair D'Silva
These values have been taken from the device specifications. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/ocxlpmem.h | 73 ++ 1 file changed, 73 insertions(+) diff --git a/drivers/nvdimm/ocxl/ocxlpmem.h b/drivers/nvdimm/ocxl/ocxlpmem.h index

[PATCH v4 24/25] nvdimm/ocxl: Expose the serial number & firmware version in sysfs

2020-03-29 Thread Alastair D'Silva
This patch exposes the serial number & firmware version in sysfs, which will be used by ndctl in userspace to help users identify the device. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 42 -- 1 file changed, 40 insertions(+), 2 delet

[PATCH v4 20/25] nvdimm/ocxl: Add an IOCTL to request controller health & perf data

2020-03-29 Thread Alastair D'Silva
atch. Userspace will be notified of pending error logs via an event. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 16 include/uapi/nvdimm/ocxlpmem.h | 1 + 2 files changed, 17 insertions(+) diff --git a/drivers/nvdimm/ocxl/main.c b/drivers/nvdimm/ocxl/main.c i

[PATCH v4 21/25] nvdimm/ocxl: Implement the heartbeat command

2020-03-29 Thread Alastair D'Silva
The heartbeat admin command is a simple admin command that exercises the communication mechanisms within the controller. This patch issues a heartbeat command to the card during init to ensure we can communicate with the card's controller. Signed-off-by: Alastair D'Silva Reviewed-by: Andrew

[PATCH v4 25/25] MAINTAINERS: Add myself & nvdimm/ocxl to ocxl

2020-03-29 Thread Alastair D'Silva
The OpenCAPI Persistent Memory driver will be maintained as part ofi the ppc tree. I'm also adding myself as an author of the driver & contributor to the generic ocxl driver. Signed-off-by: Alastair D'Silva --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINE

[PATCH v4 05/25] ocxl: Address kernel doc errors & warnings

2020-03-29 Thread Alastair D'Silva
This patch addresses warnings and errors from the kernel doc scripts for the OpenCAPI driver. It also makes minor tweaks to make the docs more consistent. Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c| 24 drivers/misc/ocxl

[PATCH v4 07/25] ocxl: Add functions to map/unmap LPC memory

2020-03-29 Thread Alastair D'Silva
Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva Acked-by: Frederic Barrat --- drivers/misc/ocxl/core.c | 51 +++ drivers/misc/ocxl/ocxl_internal.h | 3 ++ include/misc/ocxl.h | 21 + 3 files changed, 75

[PATCH v4 04/25] ocxl: Remove unnecessary externs

2020-03-29 Thread Alastair D'Silva
Function declarations don't need externs, remove the existing ones so they are consistent with newer code Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Acked-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 40 ++--- include/misc/ocxl.h

[PATCH v4 14/25] nvdimm/ocxl: Add support for Admin commands

2020-03-29 Thread Alastair D'Silva
requests the metadata required to issue admin commands, as well as some helper functions to construct and check the completion of the commands. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/main.c | 65 ++ drivers/nvdimm/ocxl/ocxlpmem.h | 50 - drivers/nvdimm

[PATCH v4 11/25] powerpc: Enable the OpenCAPI Persistent Memory driver for powernv_defconfig

2020-03-29 Thread Alastair D'Silva
-by: Alastair D'Silva Reviewed-by: Andrew Donnellan --- arch/powerpc/configs/powernv_defconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig index 71749377d164..921d77bbd3d2 100644 --- a/arch/powerpc/configs

[PATCH v4 02/25] mm/memory_hotplug: Allow check_hotplug_memory_addressable to be called from drivers

2020-03-29 Thread Alastair D'Silva
device. Signed-off-by: Alastair D'Silva Reviewed-by: Andrew Donnellan --- include/linux/memory_hotplug.h | 5 + mm/memory_hotplug.c| 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index

[PATCH v4 03/25] powerpc/powernv: Map & release OpenCAPI LPC memory

2020-03-29 Thread Alastair D'Silva
This patch adds OPAL calls to powernv so that the OpenCAPI driver can map & release LPC (Lowest Point of Coherency) memory. Signed-off-by: Alastair D'Silva Reviewed-by: Andrew Donnellan --- arch/powerpc/include/asm/pnv-ocxl.h | 2 ++ arch/powerpc/platforms/powernv/ocxl.c

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

2020-03-29 Thread Alastair D'Silva
ead - Rename scm_foo_offset_0x00 to scm_foo_header_parse & add docs - Name DIMM attribs "ocxl" rather than "scm" - Split out into base + many feature patches - "powerpc: Enable OpenCAPI Storage Class Memory driver on bare metal" - Bui

[PATCH v4 09/25] ocxl: Save the device serial number in ocxl_fn

2020-03-28 Thread Alastair D'Silva
This patch retrieves the serial number of the card and makes it available to consumers of the ocxl driver via the ocxl_fn struct. Signed-off-by: Alastair D'Silva Acked-by: Frederic Barrat Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c | 46

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

2020-03-28 Thread Alastair D'Silva
is registered with libnvdimm as an nvdimm. ndctl_config_read/write/size() provide callbacks to libnvdimm to access the metadata. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/Kconfig | 2 + drivers/nvdimm/Makefile| 1 + drivers/nvdimm/ocxl/Kconfig| 15 ++ drivers/nvdimm

[PATCH v4 13/25] nvdimm/ocxl: Read the capability registers & wait for device ready

2020-03-28 Thread Alastair D'Silva
This patch reads timeouts & firmware version from the controller, and uses those timeouts to wait for the controller to report that it is ready before handing the memory over to libnvdimm. Signed-off-by: Alastair D'Silva --- drivers/nvdimm/ocxl/Makefile| 2 +- drivers/nvdimm/

[PATCH v4 01/25] powerpc/powernv: Add OPAL calls for LPC memory alloc/release

2020-03-28 Thread Alastair D'Silva
Add OPAL calls for LPC memory alloc/release Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Acked-by: Frederic Barrat --- arch/powerpc/include/asm/opal-api.h| 2 ++ arch/powerpc/include/asm/opal.h| 2 ++ arch/powerpc/platforms/powernv/opal-call.c | 2 ++ 3 files

[PATCH v4 08/25] ocxl: Emit a log message showing how much LPC memory was detected

2020-03-28 Thread Alastair D'Silva
This patch emits a message showing how much LPC memory & special purpose memory was detected on an OCXL device. Signed-off-by: Alastair D'Silva Acked-by: Frederic Barrat Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c | 4 1 file changed, 4 insertions(+) diff --git a/dri

Re: [PATCH v3 24/27] powerpc/powernv/pmem: Expose SMART data via ndctl

2020-03-12 Thread Alastair D'Silva
On Thu, 2020-03-05 at 14:36 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +static int ndctl_smart(struct ocxlpmem *ocxlpmem, struct > > nd_cmd_pkg *pkg) > > +{ > > + u32 length, i; > > + struct nd_ocxl_smart *out; > &g

Re: [PATCH v3 23/27] powerpc/powernv/pmem: Add debug IOCTLs

2020-03-11 Thread Alastair D'Silva
On Thu, 2020-03-05 at 14:11 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > These IOCTLs provide low level access to the card to aid in > > debugging > > controller/FPGA firmware. > &g

Re: [PATCH v3 19/27] powerpc/powernv/pmem: Add an IOCTL to report controller statistics

2020-03-11 Thread Alastair D'Silva
On Thu, 2020-03-05 at 11:46 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > The controller can report a number of statistics that are useful > > in evaluating the performance and reliability of the card.

Re: [PATCH v3 23/27] powerpc/powernv/pmem: Add debug IOCTLs

2020-03-11 Thread Alastair D'Silva
On Wed, 2020-03-04 at 16:21 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > These IOCTLs provide low level access to the card to aid in > > debugging > > controller/FPGA firmware. >

Re: [PATCH v3 19/27] powerpc/powernv/pmem: Add an IOCTL to report controller statistics

2020-03-11 Thread Alastair D'Silva
On Wed, 2020-03-04 at 10:25 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > The controller can report a number of statistics that are useful > > in evaluating the performance and reliability of

Re: [PATCH v3 21/27] powerpc/powernv/pmem: Add an IOCTL to request controller health & perf data

2020-03-10 Thread Alastair D'Silva
On Wed, 2020-03-04 at 12:06 +0100, Frederic Barrat wrote: > > Le 28/02/2020 à 07:12, Andrew Donnellan a écrit : > > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > > From: Alastair D'Silva > > > > > > When health & performance data is reque

Re: [PATCH v3 20/27] powerpc/powernv/pmem: Forward events to userspace

2020-03-10 Thread Alastair D'Silva
On Wed, 2020-03-04 at 12:00 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > Some of the interrupts that the card generates are better handled > > by the userspace daemon, in particular: > >

Re: [PATCH v3 18/27] powerpc/powernv/pmem: Add controller dump IOCTLs

2020-03-05 Thread Alastair D'Silva
On Wed, 2020-03-04 at 17:53 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +static int ioctl_controller_dump_data(struct ocxlpmem *ocxlpmem, > > + struct ioctl_ocxl_pmem_controller_dump_data __user > > *uarg)

Re: [PATCH v3 18/27] powerpc/powernv/pmem: Add controller dump IOCTLs

2020-03-05 Thread Alastair D'Silva
On Tue, 2020-03-03 at 19:04 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > This patch adds IOCTLs to allow userspace to request & fetch dumps > > of the internal controller state. > &

Re: [PATCH v3 17/27] powerpc/powernv/pmem: Implement the Read Error Log command

2020-03-04 Thread Alastair D'Silva
On Tue, 2020-03-03 at 11:36 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > The read error log command extracts information from the > > controller's > > internal error log. > > &g

Re: [PATCH v3 16/27] powerpc/powernv/pmem: Register a character device for userspace to interact with

2020-03-04 Thread Alastair D'Silva
On Tue, 2020-03-03 at 10:28 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > This patch introduces a character device (/dev/ocxl-scmX) which > > further > > patches will use to interact

Re: [PATCH v3 20/27] powerpc/powernv/pmem: Forward events to userspace

2020-03-03 Thread Alastair D'Silva
On Tue, 2020-03-03 at 18:02 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote:> @@ -938,6 +955,51 @@ > static > int ioctl_controller_stats(struct ocxlpmem *ocxlpmem, > > return rc; > > } > > > > +static int ioc

Re: [PATCH v3 03/27] powerpc: Map & release OpenCAPI LPC memory

2020-03-03 Thread Alastair D'Silva
On Tue, 2020-03-03 at 17:10 +1100, Andrew Donnellan wrote: > On 21/2/20 2:26 pm, Alastair D'Silva wrote:> +#ifdef > CONFIG_MEMORY_HOTPLUG_SPARSE > > +u64 pnv_ocxl_platform_lpc_setup(struct pci_dev *pdev, u64 size) > > +{ > > + struct pci_controller *hose

RE: [PATCH v3 15/27] powerpc/powernv/pmem: Add support for near storage commands

2020-03-03 Thread Alastair D'Silva
On Mon, 2020-03-02 at 10:42 -0800, Dan Williams wrote: > On Mon, Mar 2, 2020 at 9:59 AM Frederic Barrat > wrote: > > > > > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > > From: Alastair D'Silva > > > > > > Similar to the

Re: [PATCH v3 13/27] powerpc/powernv/pmem: Read the capability registers & wait for device ready

2020-03-03 Thread Alastair D'Silva
On Mon, 2020-03-02 at 18:51 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > This patch reads timeouts & firmware version from the controller, > > and > > uses those timeo

Re: [PATCH v3 26/27] powerpc/powernv/pmem: Expose the firmware version in sysfs

2020-03-03 Thread Alastair D'Silva
On Mon, 2020-03-02 at 18:35 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > This information will be used by ndctl in userspace to help users > > identify > > the device. > > You should includ

Re: [PATCH v3 16/27] powerpc/powernv/pmem: Register a character device for userspace to interact with

2020-03-01 Thread Alastair D'Silva
On Mon, 2020-03-02 at 16:34 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > This patch introduces a character device (/dev/ocxl-scmX) which > > further > > patches will use to interact with use

Re: [PATCH v3 21/27] powerpc/powernv/pmem: Add an IOCTL to request controller health & perf data

2020-03-01 Thread Alastair D'Silva
On Fri, 2020-02-28 at 17:12 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > When health & performance data is requested from the controller, > > it responds with an error log containing the requested i

RE: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-03-01 Thread Alastair D'Silva
On Mon, 2020-03-02 at 10:42 +1100, Alastair D'Silva wrote: > On Fri, 2020-02-28 at 08:15 +0100, Greg Kroah-Hartman wrote: > > On Fri, Feb 28, 2020 at 05:25:31PM +1100, Andrew Donnellan wrote: > > > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > > > +int ocxl

RE: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-03-01 Thread Alastair D'Silva
On Fri, 2020-02-28 at 08:15 +0100, Greg Kroah-Hartman wrote: > On Fri, Feb 28, 2020 at 05:25:31PM +1100, Andrew Donnellan wrote: > > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > > +int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem) > > > +{ > > > + int

Re: [PATCH v3 10/27] powerpc: Add driver for OpenCAPI Persistent Memory

2020-02-27 Thread Alastair D'Silva
On Thu, 2020-02-27 at 21:44 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > This driver exposes LPC memory on OpenCAPI pmem cards > > as an NVDIMM, allowing the existing nvram

RE: [PATCH v3 14/27] powerpc/powernv/pmem: Add support for Admin commands

2020-02-27 Thread Alastair D'Silva
On Thu, 2020-02-27 at 09:01 -0800, Dan Williams wrote: > On Thu, Feb 20, 2020 at 7:28 PM Alastair D'Silva < > alast...@au1.ibm.com> wrote: > > From: Alastair D'Silva > > > > This patch requests the metadata required to issue admin commands, > > as well >

Re: [PATCH v3 15/27] powerpc/powernv/pmem: Add support for near storage commands

2020-02-27 Thread Alastair D'Silva
On Thu, 2020-02-27 at 19:30 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote:> +int > ns_response_handled(const struct ocxlpmem *ocxlpmem) > > +{ > > + return ocxl_global_mmio_set64(ocxlpmem->ocxl_a

Re: [PATCH v3 14/27] powerpc/powernv/pmem: Add support for Admin commands

2020-02-27 Thread Alastair D'Silva
error on the read? > > I see that in the next patch, in ns_command_request() you check that > NSCRA is 1 - did you mean to check that ACRA = 1 here? > > I was in one version, but that was causing problems in startup since there was successful prior command to assert ACRA. I shou

Re: [PATCH v3 14/27] powerpc/powernv/pmem: Add support for Admin commands

2020-02-27 Thread Alastair D'Silva
On Thu, 2020-02-27 at 19:22 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > This patch requests the metadata required to issue admin commands, > > as well > > as some helper functions to c

Re: [PATCH v3 12/27] powerpc/powernv/pmem: Add register addresses & status values to the header

2020-02-26 Thread Alastair D'Silva
On Thu, 2020-02-27 at 16:08 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > These values have been taken from the device specifications. > > > > Signed-off-by: Alastair D'Silva > > I've com

Re: [PATCH v3 13/27] powerpc/powernv/pmem: Read the capability registers & wait for device ready

2020-02-26 Thread Alastair D'Silva
On Thu, 2020-02-27 at 14:54 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +/** > > + * read_device_metadata() - Retrieve config information from the > > AFU and save it for future use > > + * @ocxlpmem: the device metadata > > +

RE: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread Alastair D'Silva
> -Original Message- > From: Baoquan He > Sent: Wednesday, 26 February 2020 7:15 PM > To: Alastair D'Silva > Cc: alast...@d-silva.org; Aneesh Kumar K . V > ; Oliver O'Halloran ; > Benjamin Herrenschmidt ; Paul Mackerras > ; Michael Ellerman ; Frederic > Barrat

Re: [PATCH v3 10/27] powerpc: Add driver for OpenCAPI Persistent Memory

2020-02-25 Thread Alastair D'Silva
On Wed, 2020-02-26 at 16:07 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > This driver exposes LPC memory on OpenCAPI pmem cards > > as an NVDIMM, allowing the existing nvram infrastructure > &g

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

2020-02-25 Thread Alastair D'Silva
On Tue, 2020-02-25 at 16:32 -0800, Dan Williams wrote: > On Tue, Feb 25, 2020 at 4:14 PM Alastair D'Silva < > alast...@au1.ibm.com> wrote: > > On Mon, 2020-02-24 at 17:51 +1100, Oliver O'Halloran wrote: > > > On Mon, Feb 24, 2020 at 3:43 PM Alastair D'Silva < >

Re: [PATCH v3 06/27] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2020-02-25 Thread Alastair D'Silva
On Tue, 2020-02-25 at 17:30 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:26, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > Tally up the LPC memory on an OpenCAPI link & allow it to be mapped > > > > Signed-off-by: Alastair D'Silva

Re: [PATCH v3 03/27] powerpc: Map & release OpenCAPI LPC memory

2020-02-25 Thread Alastair D'Silva
On Tue, 2020-02-25 at 11:02 +0100, Frederic Barrat wrote: > > Le 21/02/2020 à 04:26, Alastair D'Silva a écrit : > > From: Alastair D'Silva > > > > This patch adds platform support to map & release LPC memory. > > > > Signed-off-by: Alastair D'Silva &g

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

2020-02-25 Thread Alastair D'Silva
On Mon, 2020-02-24 at 17:51 +1100, Oliver O'Halloran wrote: > On Mon, Feb 24, 2020 at 3:43 PM Alastair D'Silva < > alast...@au1.ibm.com> wrote: > > On Sun, 2020-02-23 at 20:37 -0800, Matthew Wilcox wrote: > > > On Mon, Feb 24, 2020 at 03:34:07PM +1100, Alastai

Re: [PATCH v3 08/27] ocxl: Emit a log message showing how much LPC memory was detected

2020-02-23 Thread Alastair D'Silva
On Mon, 2020-02-24 at 17:06 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > This patch emits a message showing how much LPC memory & special > > purpose > > memory was detected on an OCXL dev

Re: [PATCH v3 07/27] ocxl: Add functions to map/unmap LPC memory

2020-02-23 Thread Alastair D'Silva
On Mon, 2020-02-24 at 17:02 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > Add functions to map/unmap LPC memory > > > > Signed-off-by: Alastair D'Silva > > --- >

Re: [PATCH v3 01/27] powerpc: Add OPAL calls for LPC memory alloc/release

2020-02-23 Thread Alastair D'Silva
On Mon, 2020-02-24 at 16:49 +1100, Andrew Donnellan wrote: > On 21/2/20 2:26 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > Add OPAL calls for LPC memory alloc/release > > > > Signed-off-by: Alastair D'Silva > > Acked-by: Andrew D

Re: [PATCH v3 06/27] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2020-02-23 Thread Alastair D'Silva
On Mon, 2020-02-24 at 16:25 +1100, Andrew Donnellan wrote: > On 21/2/20 2:26 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > Tally up the LPC memory on an OpenCAPI link & allow it to be mapped > > > > Signed-off-by: Alastair D'Silva &g

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

2020-02-23 Thread Alastair D'Silva
On Sun, 2020-02-23 at 20:37 -0800, Matthew Wilcox wrote: > On Mon, Feb 24, 2020 at 03:34:07PM +1100, Alastair D'Silva wrote: > > V3: > > - Rebase against next/next-20200220 > > - Move driver to arch/powerpc/platforms/powernv, we now expect > > this > > driv

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

2020-02-23 Thread Alastair D'Silva
On Fri, 2020-02-21 at 08:21 -0800, Dan Williams wrote: > On Thu, Feb 20, 2020 at 7:28 PM Alastair D'Silva < > alast...@au1.ibm.com> wrote: > > From: Alastair D'Silva > > > > This series adds support for OpenCAPI Persistent Memory devices, > > exposing > &g

[PATCH v3 03/27] powerpc: Map & release OpenCAPI LPC memory

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch adds platform support to map & release LPC memory. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-ocxl.h | 4 +++ arch/powerpc/platforms/powernv/ocxl.c | 43 +++ 2 files changed, 47 insertions(+) diff --git a/

[PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva Function declarations don't need externs, remove the existing ones so they are consistent with newer code Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-ocxl.h | 32 ++--- include/misc/ocxl.h | 6 +++--- 2 files

[PATCH v3 16/27] powerpc/powernv/pmem: Register a character device for userspace to interact with

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch introduces a character device (/dev/ocxl-scmX) which further patches will use to interact with userspace. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c| 116 +- .../platforms/powernv/pmem/ocxl_internal.h

[PATCH v3 12/27] powerpc/powernv/pmem: Add register addresses & status values to the header

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva These values have been taken from the device specifications. Signed-off-by: Alastair D'Silva --- .../platforms/powernv/pmem/ocxl_internal.h| 72 +++ 1 file changed, 72 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h b

[PATCH v3 21/27] powerpc/powernv/pmem: Add an IOCTL to request controller health & perf data

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva When health & performance data is requested from the controller, it responds with an error log containing the requested information. This patch allows the request to me issued via an IOCTL. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/oc

[PATCH v3 19/27] powerpc/powernv/pmem: Add an IOCTL to report controller statistics

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva The controller can report a number of statistics that are useful in evaluating the performance and reliability of the card. This patch exposes this information via an IOCTL. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c | 185

[PATCH v3 22/27] powerpc/powernv/pmem: Implement the heartbeat command

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva The heartbeat admin command is a simple admin command that exercises the communication mechanisms within the controller. This patch issues a heartbeat command to the card during init to ensure we can communicate with the card's controller. Signed-off-by: Alastair D'Silva

[PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This information will be used by ndctl in userspace to help users identify the device. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/Makefile | 2 +- arch/powerpc/platforms/powernv/pmem/ocxl.c| 5 +++ .../platforms/powernv/pmem

[PATCH v3 23/27] powerpc/powernv/pmem: Add debug IOCTLs

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva These IOCTLs provide low level access to the card to aid in debugging controller/FPGA firmware. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/Kconfig | 6 + arch/powerpc/platforms/powernv/pmem/ocxl.c | 249 include/uapi

[PATCH v3 20/27] powerpc/powernv/pmem: Forward events to userspace

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva Some of the interrupts that the card generates are better handled by the userspace daemon, in particular: Controller Hardware/Firmware Fatal Controller Dump Available Error Log available This patch allows a userspace application to register an eventfd with the driver via

[PATCH v3 10/27] powerpc: Add driver for OpenCAPI Persistent Memory

2020-02-20 Thread Alastair D'Silva
From: 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

[PATCH v3 17/27] powerpc/powernv/pmem: Implement the Read Error Log command

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva The read error log command extracts information from the controller's internal error log. This patch exposes this information in 2 ways: - During probe, if an error occurs & a log is available, print it to the console - After probe, make the error log avail

[PATCH v3 08/27] ocxl: Emit a log message showing how much LPC memory was detected

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch emits a message showing how much LPC memory & special purpose memory was detected on an OCXL device. Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/misc/ocxl/config.c b/dri

[PATCH v3 27/27] MAINTAINERS: Add myself & nvdimm/ocxl to ocxl

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva The OpenCAPI Persistent Memory driver will be maintained as part ofi the ppc tree. I'm also adding myself as an author of the driver & contributor to the generic ocxl driver. Signed-off-by: Alastair D'Silva --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+)

[PATCH v3 14/27] powerpc/powernv/pmem: Add support for Admin commands

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch requests the metadata required to issue admin commands, as well as some helper functions to construct and check the completion of the commands. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c| 65 .../platforms

[PATCH v3 15/27] powerpc/powernv/pmem: Add support for near storage commands

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva Similar to the previous patch, this adds support for near storage commands. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c| 6 +++ .../platforms/powernv/pmem/ocxl_internal.c| 41 +++ .../platforms/powernv/pmem

[PATCH v3 18/27] powerpc/powernv/pmem: Add controller dump IOCTLs

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch adds IOCTLs to allow userspace to request & fetch dumps of the internal controller state. This is useful during debugging or when a fatal error on the controller has occurred. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/oc

[PATCH v3 11/27] powerpc: Enable the OpenCAPI Persistent Memory driver for powernv_defconfig

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch enables the OpenCAPI Persistent Memory driver, as well as DAX support, for the 'powernv' platform. DAX is not a strict requirement for the functioning of the driver, but it is likely that a user will want to create a DAX device on top of their persistent memory

[PATCH v3 24/27] powerpc/powernv/pmem: Expose SMART data via ndctl

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch retrieves proprietary formatted SMART data and makes it available via ndctl. A later contribution will be made to ndctl to parse this data. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c| 128

[PATCH v3 13/27] powerpc/powernv/pmem: Read the capability registers & wait for device ready

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch reads timeouts & firmware version from the controller, and uses those timeouts to wait for the controller to report that it is ready before handing the memory over to libnvdimm. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/Make

[PATCH v3 05/27] ocxl: Address kernel doc errors & warnings

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch addresses warnings and errors from the kernel doc scripts for the OpenCAPI driver. It also makes minor tweaks to make the docs more consistent. Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 24 drivers/misc/ocxl

[PATCH v3 26/27] powerpc/powernv/pmem: Expose the firmware version in sysfs

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This information will be used by ndctl in userspace to help users identify the device. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl_sysfs.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pmem

[PATCH v3 07/27] ocxl: Add functions to map/unmap LPC memory

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/core.c | 51 +++ drivers/misc/ocxl/ocxl_internal.h | 3 ++ include/misc/ocxl.h | 21 + 3 files changed, 75

[PATCH v3 09/27] ocxl: Save the device serial number in ocxl_fn

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This patch retrieves the serial number of the card and makes it available to consumers of the ocxl driver via the ocxl_fn struct. Signed-off-by: Alastair D'Silva Acked-by: Frederic Barrat Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c | 46

[PATCH v3 06/27] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva Tally up the LPC memory on an OpenCAPI link & allow it to be mapped Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/core.c | 10 ++ drivers/misc/ocxl/link.c | 53 +++ drivers/misc/ocxl/ocxl_internal.h

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

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This series adds support for OpenCAPI Persistent Memory devices, exposing them as nvdimms so that we can make use of the existing infrastructure. Alastair D'Silva (27): powerpc: Add OPAL calls for LPC memory alloc/release mm/memory_hotplug: Allow

  1   2   3   4   >