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

2020-03-05 Thread Frederic Barrat
+ if (rc) + goto out; + + rc = ocxl_global_mmio_read64(ocxlpmem->ocxl_afu, +ocxlpmem- admin_command.data_offset + 0x28, +OCXL_HOST_ENDIAN, &log->wwid[1]); + if (rc) + goto out

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

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : 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 --- Nothing new to add compared

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

2020-03-04 Thread Frederic Barrat
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. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/Kconfig | 6 + arch/powerpc/platforms/powernv

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

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : 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 th

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

2020-03-04 Thread Frederic Barrat
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 requested from the controller, it responds with an error log containing the requested information. This patch allows the request to me issue

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

2020-03-04 Thread Frederic Barrat
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: Controller Hardware/Firmware Fatal Controller Dump Available Error Log available This patch allows a userspace ap

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

2020-03-04 Thread Frederic Barrat
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 the card. This patch exposes this information via an IOCTL. Signed-off-by: Alastair D'Silva --- arch/

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

2020-03-03 Thread Frederic Barrat
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. This is useful during debugging or when a fatal error on the controller has occurred. Signed-off-by: Alastair D'Silva

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

2020-03-03 Thread Frederic Barrat
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. This patch exposes this information in 2 ways: - During probe, if an error occurs & a log is available, print it to the consol

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

2020-03-03 Thread Frederic Barrat
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 with userspace. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c| 116 +++

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

2020-03-02 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva Similar to the previous patch, this adds support for near storage commands. Signed-off-by: Alastair D'Silva --- Is any of these new functions ever called? Fred arch/powerpc/platforms/powernv/pmem/ocxl.c|

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

2020-03-02 Thread Frederic Barrat
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 timeouts to wait for the controller to report that it is ready before handing the memory over to libnvdimm. Signed-off-by: Alastair D'Silv

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

2020-02-28 Thread Frederic Barrat
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 infrastructure to be used. Namespace metadata is stored on the media itself, so scm_reserve_metadata() maps 1 section's wor

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

2020-02-27 Thread Frederic Barrat
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 infrastructure to be used. Namespace metadata is stored on the media itself, so scm_reserve_metadata() maps 1 section's wor

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

2020-02-25 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : 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 --- Acked-by: Frederic Barrat drivers/mis

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

2020-02-25 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva --- It looks ok to me. Acked-by: Frederic Barrat drivers/misc/ocxl/core.c | 51 +++

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

2020-02-25 Thread Frederic Barrat
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 --- drivers/misc/ocxl/core.c | 10 ++ drivers/misc/ocxl/link.c | 53 +

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

2020-02-25 Thread Frederic Barrat
Le 21/02/2020 à 04:26, Alastair D'Silva a écrit : 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 --- Thanks for the cleanup! Acked-by: Frederic Barrat

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

2020-02-25 Thread Frederic Barrat
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 --- arch/powerpc/include/asm/pnv-ocxl.h | 4 +++ arch/powerpc/platforms/powernv/ocxl.c | 43 ++

Re: [PATCH v2 05/27] powerpc: Map & release OpenCAPI LPC memory

2020-02-14 Thread Frederic Barrat
Le 03/12/2019 à 04:46, 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 --- arch/powerpc/include/asm/pnv-ocxl.h | 2 ++ arch/powerpc/platforms/powernv/ocxl.c | 42 +++

Re: [PATCH v2 09/27] ocxl: Free detached contexts in ocxl_context_detach_all()

2020-01-09 Thread Frederic Barrat
Le 03/12/2019 à 04:46, Alastair D'Silva a écrit : From: Alastair D'Silva ocxl_context_detach_all() is called from ocxl_function_close(), so there is no reason to leave the contexts allocated, as the caller can do nothing useful with them at that point. This also has the side-effect of freein

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

2020-01-09 Thread Frederic Barrat
Le 03/12/2019 à 04:46, Alastair D'Silva a écrit : From: Alastair D'Silva Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 4 +++ drivers/misc/ocxl/core.c | 50 +++ drivers/misc/ocxl/ocxl_i

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

2020-01-09 Thread Frederic Barrat
Le 03/12/2019 à 04:46, 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 --- drivers/misc/ocxl/core.c | 10 ++ drivers/misc/ocxl/link.c | 60 +

Re: [PATCH v2 05/27] powerpc: Map & release OpenCAPI LPC memory

2020-01-09 Thread Frederic Barrat
Le 03/12/2019 à 04:46, 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 --- It looks ok now, thanks Acked-by: Frederic Barrat arch/powerpc/include/asm/pnv-ocxl.h |

Re: [PATCH 08/10] nvdimm: Add driver for OpenCAPI Storage Class Memory

2019-11-14 Thread Frederic Barrat
Hi Alastair, The patch is huge and could/should probably be split in smaller pieces to ease the review. However, having sinned on that same topic in the past, I made a first pass anyway. I haven't covered everything but tried to focus on the general setup of the driver for now. Since the patch

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

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : 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 a/arch/powerpc/configs/power

Re: [PATCH 07/10] ocxl: Save the device serial number in ocxl_fn

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : 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

Re: [PATCH 10/10] ocxl: Conditionally bind SCM devices to the generic OCXL driver

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : From: Alastair D'Silva This patch allows the user to bind OpenCAPI SCM devices to the generic OCXL driver. Signed-off-by: Alastair D'Silva --- I'm wondering if we should upstream this. Is it of any use outside of some serious debug sessi

Re: [PATCH 06/10] ocxl: Add functions to map/unmap LPC memory

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : From: Alastair D'Silva Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 4 +++ drivers/misc/ocxl/core.c | 50 +++ drivers/misc/ocxl/ocxl_i

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

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, 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 --- drivers/misc/ocxl/core.c | 10 ++ drivers/misc/ocxl/link.c | 60 +

Re: [PATCH 04/10] powerpc: Map & release OpenCAPI LPC memory

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:46, 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 --- arch/powerpc/include/asm/pnv-ocxl.h | 2 ++ arch/powerpc/platforms/powernv/ocxl.c | 41 +++

Re: [PATCH 02/10] nvdimm: remove prototypes for nonexistent functions

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:46, Alastair D'Silva a écrit : From: Alastair D'Silva These functions don't exist, so remove the prototypes for them. Signed-off-by: Alastair D'Silva --- Reviewed-by: Frederic Barrat drivers/nvdimm/nd-core.h | 4 1 file changed, 4 dele

Re: [PATCH 03/10] powerpc: Add OPAL calls for LPC memory alloc/release

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:46, Alastair D'Silva a écrit : From: 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/