[PATCH 3/4] ocxl: Don't return trigger page when allocating an interrupt

2020-04-02 Thread Frederic Barrat
of its custom service. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/Kconfig | 2 +- drivers/misc/ocxl/afu_irq.c | 4 +--- drivers/misc/ocxl/link.c| 15 +++ drivers/scsi/cxlflash/ocxl_hw.c | 3 +-- include/misc/ocxl.h | 10 ++ 5 files

[PATCH 0/4] ocxl: Cleanup AFU interrupt allocation

2020-04-02 Thread Frederic Barrat
the interrupt has been mapped, but that is not a problem with the way the code is using it. No functional change. Frederic Barrat (4): scsi: cxlflash: Access interrupt trigger page from xive directly ocxl: Access interrupt trigger page from xive directly ocxl: Don't return trigger page when

[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

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 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: [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

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

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 +

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

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

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

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

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

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

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

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

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

Re: [PATCH] ocxl: Fix misleading comment

2020-02-25 Thread Frederic Barrat
ed. 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 really be: Fixes: b9721d

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/misc/ocxl/config.c

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 +++ drivers/misc

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 arch/powerpc

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

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 1/1] powerpc/eeh: fix deadlock handling dead PHB

2020-02-07 Thread Frederic Barrat
is unrelated to the loop. This causes the pe to be, incorrectly, processed more than once. Untangling this section can move the pe processing out of the loop and also outside the locked section, correcting both problems. Signed-off-by: Sam Bobroff --- Reviewed-by: Frederic Barrat Tested-by: Frederic

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

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

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 | 2 ++

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

2020-01-08 Thread Frederic Barrat
Le 08/01/2020 à 08:33, Andrew Donnellan a écrit : On 22/11/19 12:49 am, Frederic Barrat wrote: The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the device was required. However, the pci_dev pointer was later removed from the pci_dn structure

[PATCH v3] ocxl: Fix potential memory leak on context creation

2019-12-09 Thread Frederic Barrat
If we couldn't fully init a context, we were leaking memory. Fixes: b9721d275cc2 ("ocxl: Allow external drivers to use OpenCAPI contexts") Signed-off-by: Frederic Barrat --- Changlog: v3: code cleanup (Greg) v2: reset context pointer in case of allocation failu

Re: [Very RFC 40/46] powernv/npu: Don't drop refcount when looking up GPU pci_devs

2019-11-27 Thread Frederic Barrat
Le 27/11/2019 à 10:33, Greg Kurz a écrit : On Wed, 27 Nov 2019 10:10:13 +0100 Frederic Barrat wrote: Le 27/11/2019 à 09:24, Greg Kurz a écrit : On Wed, 27 Nov 2019 18:09:40 +1100 Alexey Kardashevskiy wrote: On 20/11/2019 12:28, Oliver O'Halloran wrote: The comment here implies

Re: [Very RFC 40/46] powernv/npu: Don't drop refcount when looking up GPU pci_devs

2019-11-27 Thread Frederic Barrat
Le 27/11/2019 à 09:24, Greg Kurz a écrit : On Wed, 27 Nov 2019 18:09:40 +1100 Alexey Kardashevskiy wrote: On 20/11/2019 12:28, Oliver O'Halloran wrote: The comment here implies that we don't need to take a ref to the pci_dev because the ioda_pe will always have one. This implies that

[PATCH v2 10/11] pci/hotplug/pnv-php: Wrap warnings in macro

2019-11-21 Thread Frederic Barrat
. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/pci/hotplug/pnv_php.c | 51 +++ 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers

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

2019-11-21 Thread Frederic Barrat
it from the PHB ID, like skiboot. Signed-off-by: Frederic Barrat --- Changelog: v2: - rename variable used when looping (Andrew) arch/powerpc/include/asm/pnv-pci.h | 1 + arch/powerpc/platforms/powernv/pci.c | 24 ++-- 2 files changed, 15 insertions(+), 10 deletions

[PATCH v2 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-11-21 Thread Frederic Barrat
Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- Changelog: v2: no change drivers/pci/hotplug/pnv_php.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_p

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

2019-11-21 Thread Frederic Barrat
Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat --- Changelog: v2: - fix unregistration (Andrew) drivers/pci/hotplug/pnv_php.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci

[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(+) diff

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

2019-11-21 Thread Frederic Barrat
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/powernv/pci-ioda.c index

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

2019-11-21 Thread Frederic Barrat
. 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 | 8 +++- 1 file

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

2019-11-21 Thread Frederic Barrat
al 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/hotplug/pnv_php.c b

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

2019-11-21 Thread Frederic Barrat
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 expectati

[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 arch

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

2019-11-21 Thread Frederic Barrat
e 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 devices when

[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

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 reuse

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 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 think we

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 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 opencapi devices

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

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

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 drivers/misc

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

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

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 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/powerpc/include

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 deletions(-) diff --git

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

2019-10-16 Thread Frederic Barrat
. 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 all. I couldn't find a

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

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: [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: [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

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

2019-09-27 Thread Frederic Barrat
. 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'm wondering if t

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

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

2019-09-24 Thread Frederic Barrat
he 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 powerp

Re: [PATCH 4/5] ocxl: Add functions to map/unmap LPC memory

2019-09-23 Thread Frederic Barrat
diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c index 2874811a4398..9e303a5f4d85 100644 --- a/drivers/misc/ocxl/link.c +++ b/drivers/misc/ocxl/link.c @@ -738,7 +738,7 @@ int ocxl_link_add_lpc_mem(void *link_handle, u64 size) } EXPORT_SYMBOL_GPL(ocxl_link_add_lpc_mem);

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

2019-09-19 Thread Frederic Barrat
Le 19/09/2019 à 06:55, Alastair D'Silva a écrit : On Wed, 2019-09-18 at 16:02 +0200, Frederic Barrat wrote: Le 17/09/2019 à 03:42, 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'S

Re: [PATCH 2/5] powerpc: Map & release OpenCAPI LPC memory

2019-09-19 Thread Frederic Barrat
Le 19/09/2019 à 02:58, Alastair D'Silva a écrit : On Wed, 2019-09-18 at 16:03 +0200, Frederic Barrat wrote: Le 17/09/2019 à 03:42, Alastair D'Silva a écrit : From: Alastair D'Silva Map & release OpenCAPI LPC memory. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm

Re: [PATCH 4/5] ocxl: Add functions to map/unmap LPC memory

2019-09-18 Thread Frederic Barrat
Le 17/09/2019 à 03:43, 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 +++

Re: [PATCH 2/5] powerpc: Map & release OpenCAPI LPC memory

2019-09-18 Thread Frederic Barrat
Le 17/09/2019 à 03:42, Alastair D'Silva a écrit : From: Alastair D'Silva Map & release OpenCAPI LPC memory. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-ocxl.h | 2 ++ arch/powerpc/platforms/powernv/ocxl.c | 42 +++ 2 files changed, 44

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

2019-09-18 Thread Frederic Barrat
Le 17/09/2019 à 03:42, 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 | 9 + drivers/misc/ocxl/link.c | 61

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

2019-09-09 Thread Frederic Barrat
al to assert the correct value, let's remove the warning. Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 6758fd7c382e..5b5cbf1e636d 100644 --- a/drivers

[PATCH 10/11] pci/hotplug/pnv-php: Wrap warnings in macro

2019-09-09 Thread Frederic Barrat
. Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 51 +++ 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 5ca51d67db4b..d01a8595bc5c 100644 --- a/drivers/pci/hotplug

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

2019-09-09 Thread Frederic Barrat
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(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 304bdbcdb77c

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

2019-09-09 Thread Frederic Barrat
. Removing the devices will do nothing since it's not populated, and we'll set the power state of the slot back to off. Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers

[PATCH 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-09-09 Thread Frederic Barrat
Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 5b5cbf1e636d..304bdbcdb77c 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/d

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

2019-09-09 Thread Frederic Barrat
The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig index 1916fa65f2f2

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

2019-09-09 Thread Frederic Barrat
it from the PHB ID, like skiboot. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-pci.h | 1 + arch/powerpc/platforms/powernv/pci.c | 10 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/pnv-pci.h b/arch/powerpc/include/asm

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

2019-09-09 Thread Frederic Barrat
cond 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 powerpc/powernv/ioda:

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

2019-09-09 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. Signed-off-by: Frederic Barrat --- arch/powerpc/platforms/powernv/pci-ioda.c | 6 +- 1 file

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

2019-09-09 Thread Frederic Barrat
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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 59 +++ 1 file changed, 39 insertions

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

2019-09-09 Thread Frederic Barrat
of the reconfiguration of the bridge, but for opencapi PHBs, we don't have an intermediate bridge. So let's define the PE when the device is enabled. PEs are meaningless for opencapi, the NPU doesn't define them and opal is not doing anything with them. Signed-off-by: Frederic Barrat --- arch/powerpc/platforms

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

2019-09-09 Thread Frederic Barrat
therwise the pci_dev will never be released. Which is not really a surprise as the comment (removed here as no longer needed) was stating as much. Fixes: 902bdc57451c ("powerpc/powernv/idoa: Remove unnecessary pcidev from pci_dn") Signed-off-by: Frederic Barrat --- arch/powerpc/pla

Re: [PATCH] ocxl: Fix concurrent AFU open and device removal

2019-06-25 Thread Frederic Barrat
Le 24/06/2019 à 17:50, Greg Kurz a écrit : On Mon, 24 Jun 2019 17:39:26 +0200 Frederic Barrat wrote: Le 24/06/2019 à 17:24, Greg Kurz a écrit : On Mon, 24 Jun 2019 16:41:48 +0200 Frederic Barrat wrote: If an ocxl device is unbound through sysfs at the same time its AFU is being

Re: [PATCH] ocxl: Fix concurrent AFU open and device removal

2019-06-24 Thread Frederic Barrat
Le 24/06/2019 à 17:24, Greg Kurz a écrit : On Mon, 24 Jun 2019 16:41:48 +0200 Frederic Barrat wrote: If an ocxl device is unbound through sysfs at the same time its AFU is being opened by a user process, the open code may dereference freed stuctures, which can lead to kernel oops messages

[PATCH] ocxl: Fix concurrent AFU open and device removal

2019-06-24 Thread Frederic Barrat
setup is removed, instead of waiting for the 'release' device callback. With proper locking around the IDR. Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend") Signed-off-by: Frederic Barrat --- mpe: this fixes a commit merged in v5.2-rc1. It

Re: [PATCH 2/4] powerpc/powernv: remove the unused tunneling exports

2019-06-21 Thread Frederic Barrat
Le 21/06/2019 à 03:47, Oliver O'Halloran a écrit : On Thu, May 23, 2019 at 5:51 PM Christoph Hellwig wrote: These have been unused ever since they've been added to the kernel. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/pnv-pci.h| 4 --

Re: [PATCH v2] ocxl: Allow contexts to be attached with a NULL mm

2019-06-20 Thread Frederic Barrat
for the update. Acked-by: Frederic Barrat arch/powerpc/mm/book3s64/radix_tlb.c | 5 + drivers/misc/ocxl/context.c | 9 ++--- drivers/misc/ocxl/link.c | 28 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/arch

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

2019-06-19 Thread Frederic Barrat
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 powerpc/powernv/ioda: set up PE on opencapi device when enabling powerpc/powernv/ioda: Release opencapi device powerpc/pow

[RFC 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-06-19 Thread Frederic Barrat
Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 5b5cbf1e636d..5cdd2a3a4dd9 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/d

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

2019-06-19 Thread Frederic Barrat
The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig index 7fb6d39d4c5a

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

2019-06-19 Thread Frederic Barrat
al to assert the correct value, let's remove the warning. Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 6758fd7c382e..5b5cbf1e636d 100644 --- a/drivers

<    1   2   3   4   5   6   7   8   >