Re: [PATCH 00/11] opencapi: enable card reset and link retraining

2019-09-23 Thread Frederic Barrat
ned up. The second part is modifications to the PCI hotplug driver on powernv, so that a virtual slot is created for the opencapi adapters found in the device tree. Frederic Barrat (11): powerpc/powernv/ioda: Fix ref count for devices with their own PE powerpc/powernv/ioda: Protect PE list

Re: [PATCH 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-09-26 Thread Frederic Barrat
Le 26/09/2019 à 18:44, Andrew Donnellan a écrit : On 9/9/19 5:45 pm, Frederic Barrat wrote: Taking a reference on the pci_dev structure was required with initial commit 184cd4a3b962 ("powerpc/powernv: PCI support for p7IOC under OPAL v2"), where we were storing the pci_dev in

[RFC PATCH] powernv/eeh: Fix oops when probing cxl devices

2019-09-27 Thread Frederic Barrat
structure. Fixes: b905f8cdca77 ("powerpc/eeh: EEH for pSeries hot plug") Signed-off-by: Frederic Barrat --- Sending as an RFC, as I'm afraid of hiding potential issues and would be interested in comments. The powernv eeh code expects a struct pci_dn, so the fix seems safe. I'

Re: [PATCH 1/2] powerpc/powernv: ocxl move SPA definition

2019-10-14 Thread Frederic Barrat
diff --git a/arch/powerpc/platforms/powernv/ocxl.c b/arch/powerpc/platforms/powernv/ocxl.c index 8c65aacda9c8..4d26cba12b63 100644 --- a/arch/powerpc/platforms/powernv/ocxl.c +++ b/arch/powerpc/platforms/powernv/ocxl.c @@ -12,11 +12,54 @@ #define PNV_OCXL_PASID_BITS 15 #define PN

Re: [PATCH 2/2] powerpc/powernv: ocxl move TL definition

2019-10-14 Thread Frederic Barrat
Le 09/10/2019 à 17:11, christophe lombard a écrit : Specifies the templates in the Transaction Layer that the OpenCAPI device/host support when transmitting/receiving DL/DLX frames to or from the OpenCAPI device/host. Update, rename and create new few platform-specific calls which can be used

Re: [EXTERNAL] [RFC PATCH] powernv/eeh: Fix oops when probing cxl devices

2019-10-15 Thread Frederic Barrat
Le 15/10/2019 à 07:42, Sam Bobroff a écrit : On Fri, Sep 27, 2019 at 02:45:10PM +0200, Frederic Barrat wrote: Recent cleanup in the way EEH support is added to a device causes a kernel oops when the cxl driver probes a device and creates virtual devices discovered on the FPGA: BUG

Re: [EXTERNAL] [RFC PATCH] powernv/eeh: Fix oops when probing cxl devices

2019-10-16 Thread Frederic Barrat
Le 15/10/2019 à 21:41, Frederic Barrat a écrit : Le 15/10/2019 à 07:42, Sam Bobroff a écrit : On Fri, Sep 27, 2019 at 02:45:10PM +0200, Frederic Barrat wrote: Recent cleanup in the way EEH support is added to a device causes a kernel oops when the cxl driver probes a device and creates

[PATCH] powernv/eeh: Fix oops when probing cxl devices

2019-10-16 Thread Frederic Barrat
structure. The cxl driver doesn't create virtual devices on pseries so this patch doesn't fix it there intentionally. Fixes: b905f8cdca77 ("powerpc/eeh: EEH for pSeries hot plug") Signed-off-by: Frederic Barrat --- Sam: I'm resubmitting indentically as the RFC after

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/

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 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 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_

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 sess

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 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/powe

Re: [PATCH 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-11-12 Thread Frederic Barrat
Le 27/09/2019 à 08:54, Alexey Kardashevskiy a écrit : On 27/09/2019 03:15, Frederic Barrat wrote: Le 26/09/2019 à 18:44, Andrew Donnellan a écrit : On 9/9/19 5:45 pm, Frederic Barrat wrote: Taking a reference on the pci_dev structure was required with initial commit 184cd4a3b962

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 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-11-18 Thread Frederic Barrat
Le 18/11/2019 à 03:36, Alistair Popple a écrit : On Monday, 18 November 2019 12:24:24 PM AEDT Oliver O'Halloran wrote: On Mon, Nov 18, 2019 at 12:06 PM Alistair Popple wrote: On Wednesday, 13 November 2019 4:38:21 AM AEDT Frederic Barrat wrote: However, one question is whether

Re: [PATCH 1/7] ocxl: Provide global MMIO accessors for external drivers

2019-03-13 Thread Frederic Barrat
Hi Alastair, I only realize now that this patch looks a bit out of place and would fit better later in the series: it assumes an external driver can get an ocxl_afu handle, which can only happen after patch 5. And since I'm nitpicking, the year at the top of the new mmio file could be adjust

Re: [PATCH 2/7] ocxl: Allow external drivers to use OpenCAPI contexts

2019-03-13 Thread Frederic Barrat
ed later in the series (same reason as before), but: Acked-by: Frederic Barrat drivers/misc/ocxl/context.c | 9 +-- drivers/misc/ocxl/file.c | 2 +- drivers/misc/ocxl/ocxl_internal.h | 6 - include/misc/ocxl.h | 44 +++ 4 fi

Re: [PATCH 5/7] ocxl: Create a clear delineation between ocxl backend & frontend

2019-03-14 Thread Frederic Barrat
diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c index 865b3d176431..424bb0b40afb 100644 --- a/drivers/misc/ocxl/file.c +++ b/drivers/misc/ocxl/file.c -int ocxl_register_afu(struct ocxl_afu *afu) +int ocxl_file_register_afu(struct ocxl_afu *afu) { int minor; +

Re: [PATCH 3/7] ocxl: Split pci.c

2019-03-14 Thread Frederic Barrat
Le 13/03/2019 à 05:15, Alastair D'Silva a écrit : From: Alastair D'Silva In preparation for making core code available for external drivers, move the core code out of pci.c and into core.c Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/mis

Re: [PATCH 4/7] ocxl: Don't pass pci_dev around

2019-03-14 Thread Frederic Barrat
Le 13/03/2019 à 05:15, Alastair D'Silva a écrit : From: Alastair D'Silva This data is already available in a struct Signed-off-by: Alastair D'Silva --- good idea Acked-by: Frederic Barrat drivers/misc/ocxl/core.c | 38 +- 1 f

Re: [PATCH 13/38] vfs: Convert cxl to fs_context

2019-03-22 Thread Frederic Barrat
Le 14/03/2019 à 17:10, David Howells a écrit : Signed-off-by: David Howells cc: Frederic Barrat cc: Andrew Donnellan cc: linuxppc-dev@lists.ozlabs.org --- Acked-by: Frederic Barrat drivers/misc/cxl/api.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

Re: [PATCH v2 3/7] ocxl: Create a clear delineation between ocxl backend & frontend

2019-03-22 Thread Frederic Barrat
AFU. + * + * @dev: The PCI device associated with the OpenCAPI device + * @private: the opaque hardware specific information to assign to the driver + * @private_release: A callback to free the private data + */ +void ocxl_afu_set_private(struct ocxl_afu *afu, void *private, + void (*priva

Re: [PATCH v3 1/7] ocxl: Split pci.c

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 06:44, Alastair D'Silva a écrit : From: Alastair D'Silva In preparation for making core code available for external drivers, move the core code out of pci.c and into core.c Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/mis

Re: [PATCH v3 2/7] ocxl: Don't pass pci_dev around

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 06:44, Alastair D'Silva a écrit : From: Alastair D'Silva This data is already available in a struct Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/core.c | 38 +- 1 file changed

Re: [PATCH v3 3/7] ocxl: Create a clear delineation between ocxl backend & frontend

2019-03-25 Thread Frederic Barrat
This is a huge patch, there are probably ways to split it in smaller pieces to make the review easier. However, considering how much time we've already invested discussing and reviewing it, it's with by me to keep it as is. The ref-counting and device management look good to me now. A few detai

Re: [PATCH v3 4/7] ocxl: Allow external drivers to use OpenCAPI contexts

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 06:44, Alastair D'Silva a écrit : From: Alastair D'Silva Most OpenCAPI operations require a valid context, so exposing these functions to external drivers is necessary. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- See comment on previous patch regarding mer

Re: [PATCH v3 5/7] ocxl: afu_irq only deals with IRQ IDs, not offsets

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 06:44, Alastair D'Silva a écrit : From: Alastair D'Silva The use of offsets is required only in the frontend, so alter the IRQ API to only work with IRQ IDs in the backend. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc

Re: [PATCH v3 6/7] ocxl: move event_fd handling to frontend

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 06:44, Alastair D'Silva a écrit : From: Alastair D'Silva Event_fd is only used in the driver frontend, so it does not need to exist in the backend code. Relocate it to the frontend and provide an opaque mechanism for consumers instead. Signed-off-by: Alastair D'Silva ---

Re: [PATCH v3 7/7] ocxl: Provide global MMIO accessors for external drivers

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 06:44, Alastair D'Silva a écrit : From: Alastair D'Silva External drivers that communicate via OpenCAPI will need to make MMIO calls to interact with the devices. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Acked-by: Frederic Barrat

Re: [PATCH v4 0/4] ocxl: OpenCAPI Cleanup

2019-03-25 Thread Frederic Barrat
Le 25/03/2019 à 17:49, Greg Kurz a écrit : Hi Alastair, I forgot to mention it during v3 but please don't link new version of a patchset to the previous one with --in-reply-to. This is to ensure I can see them in my email client without having to scroll back many days in the past (which likel

Re: [PATCH -next] ocxl: remove set but not used variables 'tid' and 'lpid'

2019-04-03 Thread Frederic Barrat
et-variable] drivers/misc/ocxl/link.c:187:6: warning: variable 'lpid' set but not used [-Wunused-but-set-variable] They are never used and can be removed. Signed-off-by: YueHaibing --- Acked-by: Frederic Barrat drivers/misc/ocxl/link.c | 4 +--- 1 file changed, 1 insertion(+), 3

Re: [PATCH v4 1/4] ocxl: Rename struct link to ocxl_link

2019-04-03 Thread Frederic Barrat
Le 25/03/2019 à 06:34, Alastair D'Silva a écrit : From: Alastair D'Silva The term 'link' is ambiguous (especially when the struct is used for a list), so rename it for clarity. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Acked-by: Frederic Barra

Re: [PATCH v4 2/4] ocxl: read_pasid never returns an error, so make it void

2019-04-03 Thread Frederic Barrat
Le 25/03/2019 à 06:34, Alastair D'Silva a écrit : From: Alastair D'Silva No need for a return value in read_pasid as it only returns 0. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Acked-by: Frederic Barrat drivers/misc/ocxl/config.c | 9 ++---

Re: [PATCH v4 3/4] ocxl: Remove superfluous 'extern' from headers

2019-04-03 Thread Frederic Barrat
Le 25/03/2019 à 06:34, Alastair D'Silva a écrit : From: Alastair D'Silva The 'extern' keyword adds no value here. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/ocxl_internal.h | 54 +++-

Re: [PATCH v4 4/4] ocxl: Remove some unused exported symbols

2019-04-03 Thread Frederic Barrat
Le 25/03/2019 à 06:34, Alastair D'Silva a écrit : From: Alastair D'Silva Remove some unused exported symbols. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/config.c| 4 +--- drivers/misc/ocxl/ocxl_

Re: [PATCH v4 1/7] ocxl: Split pci.c

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva In preparation for making core code available for external drivers, move the core code out of pci.c and into core.c Signed-off-by: Alastai Acked-by: Frederic Barrat drivers/misc/ocxl/Makefile

Re: [PATCH v4 2/7] ocxl: Don't pass pci_dev around

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva This data is already available in a struct Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/core.c | 38 +- 1 file changed

Re: [PATCH v4 3/7] ocxl: Create a clear delineation between ocxl backend & frontend

2019-04-17 Thread Frederic Barrat
sation from core.c (backend) to pci.c (frontend). Create an ocxl_function oriented interface for initing devices & enumerating AFUs. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/context.c | 2 +- drivers/misc

Re: [PATCH v4 4/7] ocxl: Allow external drivers to use OpenCAPI contexts

2019-04-17 Thread Frederic Barrat
mory leak in here on context alloc, if we can't get a pasid from the IDR. But that's not new to this patch, I just saw it because the code was moved around. And since that's the only thing I've seen in the full series and it's super long to review, I'll address it w

Re: [PATCH v4 5/7] ocxl: afu_irq only deals with IRQ IDs, not offsets

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva The use of offsets is required only in the frontend, so alter the IRQ API to only work with IRQ IDs in the backend. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc

Re: [PATCH v4 6/7] ocxl: move event_fd handling to frontend

2019-04-17 Thread Frederic Barrat
ir D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/afu_irq.c | 74 ++- drivers/misc/ocxl/file.c | 22 - drivers/misc/ocxl/ocxl_internal.h | 5 --- include/misc/ocxl.h | 46 +++ 4 files changed,

Re: [PATCH v4 7/7] ocxl: Provide global MMIO accessors for external drivers

2019-04-17 Thread Frederic Barrat
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit : From: Alastair D'Silva External drivers that communicate via OpenCAPI will need to make MMIO calls to interact with the devices. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Acked-by: Frederic Barrat

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 AUTOSEL 5.5 096/542] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-02-17 Thread Frederic Barrat
Le 14/02/2020 à 16:41, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] Hi, Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 doesn't really need to go to stable (any of 4.19, 5.4 and 5.5). While it's probably

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 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 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 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 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] ocxl: Fix misleading comment

2020-02-25 Thread Frederic Barrat
was intended. Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") Cc: Frederic Barrat Signed-off-by: Andrew Donnellan --- ocxl_context_init() used to exist. It was renamed to ocxl_context_alloc() for good reasons as part of later work. So it should real

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 wo

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 wo

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'Sil

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 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 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 conso

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'Silv

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 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 a

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 issu

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 t

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/powern

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 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] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-03-13 Thread Frederic Barrat
Le 11/03/2020 à 12:52, Philippe Bergheaud a écrit : Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0. This patch adds an interface t

[PATCH v3] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-03-18 Thread Frederic Barrat
From: Philippe Bergheaud Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0. Signed-off-by: Philippe Bergheaud --- Changelog: v2: - re

Re: [PATCH v3] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-03-19 Thread Frederic Barrat
Le 18/03/2020 à 11:02, Frederic Barrat a écrit : From: Philippe Bergheaud Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0

[PATCH v4] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-03-30 Thread Frederic Barrat
From: Philippe Bergheaud Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0. Signed-off-by: Philippe Bergheaud Signed-off-by: Frederic

[PATCH] powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()

2019-01-09 Thread Frederic Barrat
roup for opencapi, as the device sends real addresses directly (admittedly, the virtualization story is yet to be written). So let's fix it by skipping the IOMMU group setup for opencapi PHBs. Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups") Signed-off-by: Fre

Re: [PATCH] powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()

2019-01-09 Thread Frederic Barrat
Le 09/01/2019 à 17:25, Greg Kurz a écrit : On Wed, 9 Jan 2019 16:13:42 +0100 Frederic Barrat wrote: With a recent change around IOMMU group, a system with an opencapi adapter is no longer booting and we get a kernel oops: BUG: Kernel NULL pointer dereference at 0x0028 Faulting

Re: [PATCH] powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()

2019-01-10 Thread Frederic Barrat
Le 10/01/2019 à 13:25, Michael Ellerman a écrit : Greg Kurz writes: On Wed, 9 Jan 2019 17:45:53 +0100 Frederic Barrat wrote: Le 09/01/2019 à 17:25, Greg Kurz a écrit : On Wed, 9 Jan 2019 16:13:42 +0100 Frederic Barrat wrote: With a recent change around IOMMU group, a system with

Re: [PATCH] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-25 Thread Frederic Barrat
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index c79ba1c699ad..28c28bceb063 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1932,14 +1935,20 @@ static pci_ers_result_t cxl_pci_error_detected(struct pci_dev *pdev, * * In slot_reset, free t

Re: [PATCH v2] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-28 Thread Frederic Barrat
Hi Vaibhav, 2 comments below (one of which I missed on the previous iteration, sorry). Le 26/01/2019 à 12:46, Vaibhav Jain a écrit : Within cxl module, iteration over array 'adapter->slices' may be racy at few points as it might be simultaneously read during an EEH and its contents being set t

Re: [RFC PATCH 0/2] cxl: Add support for disabling CAPP when unloading CXL

2019-01-28 Thread Frederic Barrat
Hi Vaibhav, I think there's value in there, as I'm hearing Mellanox would prefer to start from a "clean" state, as in pci mode, when they load their driver after a card FW update. However, I'm pretty reluctant to make it the default behaviour. It's not like we haven't had our share of proble

Re: [RFC PATCH 1/2] powerpc/powernv: Add support for CXL mode switch that need PHB reset

2019-01-28 Thread Frederic Barrat
Le 25/01/2019 à 06:11, Vaibhav Jain a écrit : Recent updates to OPAL [1] have provided support for new CXL modes on PHB that need to force a cold reset on the bridge (CRESET). However PHB CRESET is a multi step process and cannot be completed synchronously as expected by current kernel impleme

Re: [RFC PATCH 2/2] cxl: Force a CAPP reset when unloading CXL module

2019-01-28 Thread Frederic Barrat
Le 25/01/2019 à 06:11, Vaibhav Jain a écrit : This patch forces shutdown of CAPP when CXL module is unloaded. This is accomplished via a call to pnv_phb_to_cxl_mode() with mode == OPAL_PHB_CAPI_MODE_PCIE. Signed-off-by: Vaibhav Jain --- drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/mai

Re: [PATCH v2 1/5] drivers/accel: Introduce subsystem

2019-01-28 Thread Frederic Barrat
Le 27/01/2019 à 05:31, Andrew Donnellan a écrit : [+ linuxppc-dev, because cxl/ocxl are handled through powerpc - please cc on future versions of this series] On 26/1/19 8:13 am, Olof Johansson wrote: We're starting to see more of these kind of devices, the current upcoming wave will likely

Re: [PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-29 Thread Frederic Barrat
;. Signed-off-by: Vaibhav Jain --- Thanks for fixing this! Acked-by: Frederic Barrat Changelog: v3: * Updated a slice loop in cxl_pci_error_detectected() to ignore NULL slices [Fred] * Added a NULL AFU check in cxl_pci_slot_reset() [Fred] v2: * Fixed a wrong compar

Re: [PATCH 3/5] ocxl: read_pasid never returns an error, so make it void

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva No need for a return value in read_pasid as it only returns 0. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/config.c | 9 ++-

Re: [PATCH 4/5] ocxl: Remove superfluous 'extern' from headers

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva The 'extern' keyword adds no value here. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat drivers/misc/ocxl/ocxl_internal.h | 54 +++-

Re: [PATCH 5/5] ocxl: Remove some unused exported symbols

2019-02-27 Thread Frederic Barrat
any case: Acked-by: Frederic Barrat drivers/misc/ocxl/config.c| 2 -- drivers/misc/ocxl/ocxl_internal.h | 26 +- include/misc/ocxl.h | 23 --- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/drivers/misc/

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 05:57, Alastair D'Silva a écrit : From: Alastair D'Silva Use %# instead of using a literal '0x' Signed-off-by: Alastair D'Silva --- I don't really care either way, but it looks ok. Acked-by: Frederic Barrat drivers/misc/ocxl/config

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Frederic Barrat
Le 27/02/2019 à 09:18, Andrew Donnellan a écrit : On 27/2/19 7:04 pm, Alastair D'Silva wrote: -Original Message- From: Andrew Donnellan Sent: Wednesday, 27 February 2019 6:55 PM To: Alastair D'Silva ; 'Alastair D'Silva' Cc: 'Greg Kurz' ; 'Fr

Re: [PATCH 02/11] powerpc/powernv/ioda: Protect PE list

2019-11-19 Thread Frederic Barrat
Le 10/09/2019 à 02:34, Alastair D'Silva a écrit : On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: Protect the PHB's list of PE. Probably not needed as long as it was populated during PHB creation, but it feels right and will become required once we can add/remove openca

Re: [PATCH 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

2019-11-19 Thread Frederic Barrat
Le 19/11/2019 à 02:26, Andrew Donnellan a écrit : On 10/9/19 1:45 am, Frederic Barrat wrote: diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index 6104418c9ad5..00a79f3c989f 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc

Re: [PATCH 02/11] powerpc/powernv/ioda: Protect PE list

2019-11-19 Thread Frederic Barrat
Le 19/11/2019 à 14:22, Oliver O'Halloran a écrit : On Tue, Nov 19, 2019 at 11:57 PM Frederic Barrat wrote: Do the other accessors of ioda.pe_list also need mutex protection? pnv_ioda_setup_bus_PE() pnv_pci_dma_bus_setup() pnv_pci_init_ioda_phb() pnv_pci_ioda_setup_PEs() I thi

Re: [PATCH 08/11] pci/hotplug/pnv-php: Register opencapi slots

2019-11-19 Thread Frederic Barrat
Le 19/11/2019 à 06:18, Andrew Donnellan a écrit : On 10/9/19 1:45 am, Frederic Barrat wrote: Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat ---   drivers/pci/hotplug/pnv_php.c | 5 -   1 file changed, 4 insertions(+), 1 deletion

Re: [PATCH 04/11] powerpc/powernv/ioda: Release opencapi device

2019-11-19 Thread Frederic Barrat
Le 10/09/2019 à 02:56, Alastair D'Silva a écrit : On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: With hotplug, an opencapi device can now go away. It needs to be released, mostly to clean up its PE state. We were previously not defining any device callback. We can reus

[PATCH v2 00/11] opencapi: enable card reset and link retraining

2019-11-21 Thread Frederic Barrat
vice tree. Changelog: v2: - rebase on latest kernel - clarify the ref counting done for NPU devices when the PE is setup - address comments from Andrew and Alastair Frederic Barrat (11): powerpc/powernv/ioda: Fix ref count for devices with their own PE powerpc/powernv/ioda: Protect PE list

[PATCH v2 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2019-11-21 Thread Frederic Barrat
lease device callback for nvlink devices for example. So to be safe, this patch leaks a reference on the npu device, but only for nvlink and not opencapi. CC: a...@ozlabs.ru CC: ooh...@gmail.com Signed-off-by: Frederic Barrat --- Changelog: v2: - clarify the ref counting (and leak) done on npu devic

[PATCH v2 02/11] powerpc/powernv/ioda: Protect PE list

2019-11-21 Thread Frederic Barrat
Protect the PHB's list of PE. Probably not needed as long as it was populated during PHB creation, but it feels right and will become required once we can add/remove opencapi devices on hotplug. Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change

[PATCH v2 04/11] powerpc/powernv/ioda: Release opencapi device

2019-11-21 Thread Frederic Barrat
minor tuning. Also separate the undo of the PELT-V code in a separate function, it is not needed for NPU devices and it improves a bit the readability of the code. Signed-off-by: Frederic Barrat --- Changelog: v2: - start using pe->device_count for NPU devices to match expectatio

[PATCH v2 06/11] pci/hotplug/pnv-php: Remove erroneous warning

2019-11-21 Thread Frederic Barrat
ial to assert the correct value, let's remove the warning. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/pci/hotplug/pnv_php.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/pci/hotp

[PATCH v2 09/11] pci/hotplug/pnv-php: Relax check when disabling slot

2019-11-21 Thread Frederic Barrat
state. Removing the devices will do nothing since it's not populated, and we'll set the power state of the slot back to off. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/pci/hotplug/pnv_php.c

[PATCH v2 03/11] powerpc/powernv/ioda: set up PE on opencapi device when enabling

2019-11-21 Thread Frederic Barrat
ilva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change arch/powerpc/platforms/powernv/pci-ioda.c | 31 +-- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms

[PATCH v2 11/11] ocxl: Add PCI hotplug dependency to Kconfig

2019-11-21 Thread Frederic Barrat
The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/misc/ocxl/Kconfig | 1 + 1 file changed, 1 insertion(+)

<    1   2   3   4   5   6   7   8   >