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

[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 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-11-21 Thread Frederic Barrat
y. 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/hot

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

2019-11-21 Thread Frederic Barrat
27;s build 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

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

2019-11-21 Thread Frederic Barrat
n opencapi slot. 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

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 the

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 im

[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

[PATCH] cxl: Rework error message for incompatible slots

2020-04-07 Thread Frederic Barrat
Improve the error message shown if a capi adapter is plugged on a capi-incompatible slot directly under the PHB (no intermediate switch). Fixes: 5632874311db ("cxl: Add support for POWER9 DD2") Cc: sta...@vger.kernel.org # 4.14+ Signed-off-by: Frederic Barrat --- drivers/misc/cxl

Re: [PATCH] cxl: Rework error message for incompatible slots

2020-04-08 Thread Frederic Barrat
Le 08/04/2020 à 04:13, Andrew Donnellan a écrit : On 7/4/20 9:56 pm, Frederic Barrat wrote: Improve the error message shown if a capi adapter is plugged on a capi-incompatible slot directly under the PHB (no intermediate switch). Fixes: 5632874311db ("cxl: Add support for POWER9 DD2

Re: [PATCH AUTOSEL 5.4 69/78] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-04-21 Thread Frederic Barrat
Le 18/04/2020 à 16:40, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] This shouldn't be backported to stable. Fred The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the devic

Re: [PATCH AUTOSEL 5.4 70/78] pci/hotplug/pnv-php: Remove erroneous warning

2020-04-21 Thread Frederic Barrat
Le 18/04/2020 à 16:40, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 658ab186dd22060408d94f5c5a6d02d809baba44 ] This doesn't need to be backported to stable. Fred On powernv, when removing a device through hotplug, the following warning is logged: In

Re: [PATCH AUTOSEL 5.4 71/78] ocxl: Add PCI hotplug dependency to Kconfig

2020-04-21 Thread Frederic Barrat
Le 18/04/2020 à 16:40, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 49ce94b8677c7d7a15c4d7cbbb9ff1cd8387827b ] This shouldn't be backported to stable. Fred The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Review

Re: [PATCH AUTOSEL 4.19 41/47] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-04-21 Thread Frederic Barrat
Le 18/04/2020 à 16:42, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] Like for kernel 5.4, the patches 41, 42, 43 of this series are not desirable for stable. Fred The pci_dn structure used to store a pointer to the struct

Re: [PATCH AUTOSEL 5.5 71/75] powerpc/powernv/ioda: Fix ref count for devices with their own PE

2020-04-21 Thread Frederic Barrat
Le 18/04/2020 à 16:09, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] Like for other stable kernels, patches 71, 72, 73 of this series are not desirable for stable. Fred The pci_dn structure used to store a pointer to the

Re: [PATCH 2/8] fs: extract simple_pin/release_fs to separate files

2020-04-21 Thread Frederic Barrat
diff --git a/drivers/misc/cxl/Kconfig b/drivers/misc/cxl/Kconfig index 39eec9031487..a62795079d9c 100644 --- a/drivers/misc/cxl/Kconfig +++ b/drivers/misc/cxl/Kconfig @@ -19,6 +19,7 @@ config CXL select CXL_BASE select CXL_AFU_DRIVER_OPS select CXL_LIB + select SI

Re: [PATCH] ocxl: Fix access to the AFU Descriptor Data

2018-08-13 Thread Frederic Barrat
Le 13/08/2018 à 11:48, Andrew Donnellan a écrit : On 13/08/18 19:01, Christophe Lombard wrote: From: Christophe Lombard Your git committer email should probably match your sign-off email. The AFU Information DVSEC capability is a means to extract common, general information about all of

Re: [PATCH V2] ocxl: Fix access to the AFU Descriptor Data

2018-08-13 Thread Frederic Barrat
Descriptor Data indexed by the AFU Info Index field. Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") Cc: stable # 4.16 Signed-off-by: Christophe Lombard --- Thanks! Acked-by: Frederic Barrat Changelog[v2] - Rebase to late

Re: [PATCH kernel] cxl: Remove unused include

2018-10-03 Thread Frederic Barrat
Le 03/10/2018 à 09:46, Alexey Kardashevskiy a écrit : On 28/09/2018 22:46, Michael Ellerman wrote: Alexey Kardashevskiy writes: The included opal.h gives a wrong idea that CXL makes PPC OPAL calls while it does not so let's remote it. But it does use eg. OPAL_PHB_CAPI_MODE_SNOOP_ON

Re: [PATCH v2] misc: cxl: Use device_type helpers to access the node type

2018-12-06 Thread Frederic Barrat
Le 05/12/2018 à 20:16, Rob Herring a écrit : Remove directly accessing device_type property and use the of_node_is_type accessor instead. While not using it here, this is part of eventually removing the struct device_node.type pointer. Cc: Frederic Barrat Cc: Arnd Bergmann Cc: Greg Kroah

Re: [PATCH] ocxl: Fix endiannes bug in read_afu_name()

2018-12-10 Thread Frederic Barrat
the characters appear in the right order. Do this with le32_to_cpu(). Signed-off-by: Greg Kurz --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/config.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/config.c b/drivers/misc/ocxl/config.c

Re: [PATCH] ocxl/afu_irq: Don't include

2018-12-10 Thread Frederic Barrat
Le 10/12/2018 à 16:13, Greg Kurz a écrit : The AFU irq code doesn't need to reach out to the platform. Signed-off-by: Greg Kurz --- Acked-by: Frederic Barrat drivers/misc/ocxl/afu_irq.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/misc/ocxl/afu_irq.c b/dr

Re: [PATCH] ocxl: Simplify free_spa()

2018-12-10 Thread Frederic Barrat
pa pointer. Drop both. Signed-off-by: Greg Kurz --- OK, that looks safe enough Acked-by: Frederic Barrat drivers/misc/ocxl/link.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c index 31695a078485..eed920551

Re: [PATCH] ocxl: Clarify error path in setup_xsl_irq()

2018-12-10 Thread Frederic Barrat
(). Signed-off-by: Greg Kurz --- This looks good. I don't have a fixed limit when I start using the "goto undo" pattern, so it's likely inconsistent in other places as well. Truth is I'm not too fussed either way. Acked-by: Frederic Barrat driver

Re: [PATCH v2] cxl: no need to check return value of debugfs_create functions

2019-06-13 Thread Frederic Barrat
eturn value of the local debugfs_create_io_x64() call void, as no one ever did anything with the return value (as they did not need to.) And make the cxl_debugfs_* calls return void as no one was even checking their return value at all. Cc: Frederic Barrat Cc: Andrew Donnellan Cc: Arnd Bergman

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

2019-06-19 Thread Frederic Barrat
Le 18/06/2019 à 03:50, Andrew Donnellan a écrit : On 17/6/19 2:41 pm, Alastair D'Silva wrote: From: Alastair D'Silva If an OpenCAPI context is to be used directly by a kernel driver, there may not be a suitable mm to use. The patch makes the mm parameter to ocxl_context_attach optional. S

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

2019-06-19 Thread Frederic Barrat
se 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/platforms/pow

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

2019-06-19 Thread Frederic Barrat
f 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 --- ar

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

2019-06-19 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

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

2019-06-19 Thread Frederic Barrat
27;s build 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/i

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

2019-06-19 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. 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_

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

2019-06-19 Thread Frederic Barrat
n opencapi slot. Signed-off-by: Frederic Barrat --- drivers/pci/hotplug/pnv_php.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 74b62a8e11e7..08ac8f0df06c 100644 --- a/driv

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

2019-06-19 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 5cdd2a3a4dd9

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

2019-06-19 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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 58 +++ 1 file changed, 38 inser

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

2019-06-19 Thread Frederic Barrat
ial 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 ---

[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 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure

2019-06-19 Thread Frederic Barrat
ly. 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 ++

[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

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

2019-06-20 Thread Frederic Barrat
a --- Thanks 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(-) di

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

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

2019-06-24 Thread Frederic Barrat
ier, when the device 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

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

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

[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 -next] ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait()

2018-06-05 Thread Frederic Barrat
nlock(&ctx->status_mutex); return -ENOENT; + } O_o Thanks for fixing it Acked-by: Frederic Barrat ctx->tidr = current->thread.tidr; }

Re: [PATCH] misc: ocxl: Change return type for fault handler

2018-06-14 Thread Frederic Barrat
-by: Souptick Joarder --- Thanks! Tested and Acked-by: Frederic Barrat drivers/misc/ocxl/context.c | 22 +++--- drivers/misc/ocxl/sysfs.c | 5 ++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c

[PATCH] ocxl: Fix page fault handler in case of fault on dying process

2018-06-18 Thread Frederic Barrat
rtly after when closing the file descriptors. Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") Cc: sta...@vger.kernel.org # v4.16+ Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/link.c | 24 +++- 1 file changed, 15 insertions(+), 9

[PATCH 00/10] cxl: Remove abandonned capi support for the Mellanox CX4

2018-06-25 Thread Frederic Barrat
a real PHB" Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb" Frederic Barrat (3): Revert "cxl: Add cxl_slot_is_supported API" Revert "cxl: Allow a default context to be associated with an external pci_dev" cxl: Remove aband

[PATCH 01/10] Revert "cxl: Add kernel API to allow a context to operate with relocate disabled"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. The symbol 'cxl_set_translation_mode' is never called, so ctx->real_mode is always false. This reverts commit 7a0d85d313c2066712e530e668bc02bb741a685c. --- drivers/misc/cxl/api.c| 19 --- drivers/mis

[PATCH 02/10] Revert "cxl: Add support for interrupts on the Mellanox CX4"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit a2f67d5ee8d950caaa7a6144cf0bfb256500b73e. --- arch/powerpc/platforms/powernv/pci-cxl.c | 84 --- arch/powerpc/platforms/powernv/pci-ioda.c | 4 -- arch/powerpc/platforms/powernv

[PATCH 03/10] Revert "cxl: Add preliminary workaround for CX4 interrupt limitation"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit cbce0917e2e47d4bf5aa3b5fd6b1247f33e1a126. --- drivers/misc/cxl/api.c | 15 --- drivers/misc/cxl/base.c| 17 - drivers/misc/cxl/context.c | 1 - drivers/misc/cxl/c

[PATCH 04/10] Revert "cxl: Add kernel APIs to get & set the max irqs per context"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit 79384e4b71240abf50c375eea56060b0d79c242a. --- drivers/misc/cxl/api.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c in

[PATCH 05/10] Revert "cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit b0b5e5918ad1babfd1d43d98c7281926a7b57b9f. --- drivers/misc/cxl/Kconfig | 8 -- drivers/misc/cxl/pci.c | 236 +++ include/misc/cxl.h | 25 - 3 files

[PATCH 06/10] Revert "cxl: Add support for using the kernel API with a real PHB"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit 317f5ef1b363417b6f1e93b90dfd2ffd6be6e867. --- drivers/misc/cxl/pci.c | 3 --- drivers/misc/cxl/vphb.c | 16 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/

[PATCH 07/10] Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb"

2018-06-25 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit 4361b03430d685610e5feea3ec7846e8b9ae795f. --- arch/powerpc/include/asm/pnv-pci.h| 7 -- arch/powerpc/platforms/powernv/pci-cxl.c | 115 -- arch/powerpc/platforms/powern

[PATCH 08/10] Revert "cxl: Add cxl_slot_is_supported API"

2018-06-25 Thread Frederic Barrat
Remove abandonned capi support for the Mellanox CX4. This reverts commit 4e56f858bdde5cbfb70f61baddfaa56a8ed851bf. --- drivers/misc/cxl/pci.c | 37 - include/misc/cxl.h | 15 --- 2 files changed, 52 deletions(-) diff --git a/drivers/misc/cxl/pc

[PATCH 09/10] Revert "cxl: Allow a default context to be associated with an external pci_dev"

2018-06-25 Thread Frederic Barrat
Remove abandonned capi support for the Mellanox CX4. This reverts commit a19bd79e31769626d288cc016e21a31b6f47bf6f. --- drivers/misc/cxl/Makefile | 2 +- drivers/misc/cxl/base.c | 35 --- drivers/misc/cxl/cxl.h| 6 -- drivers/misc/cxl/main.c | 2 -- drive

[PATCH 10/10] cxl: Remove abandonned capi support for the Mellanox CX4, final cleanup

2018-06-25 Thread Frederic Barrat
Remove a few XSL/CX4 oddities which are no longer needed. A simple revert of the initial commits was not possible (or not worth it) due to the history of the code. Signed-off-by: Frederic Barrat --- drivers/misc/cxl/context.c | 2 +- drivers/misc/cxl/cxl.h | 12 -- drivers/misc/cxl

[PATCH v2 00/10] cxl: Remove abandonned capi support for the Mellanox CX4

2018-06-28 Thread Frederic Barrat
" Revert "cxl: Add support for using the kernel API with a real PHB" Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb" Frederic Barrat (3): Revert "cxl: Add cxl_slot_is_supported API" Revert "cxl: Allow a default context to be

[PATCH v2 02/10] Revert "cxl: Add support for interrupts on the Mellanox CX4"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit a2f67d5ee8d950caaa7a6144cf0bfb256500b73e. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pci-cxl.c | 84 --- arch/powerpc/platforms/powernv/pci-ioda.c | 4

[PATCH v2 03/10] Revert "cxl: Add preliminary workaround for CX4 interrupt limitation"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit cbce0917e2e47d4bf5aa3b5fd6b1247f33e1a126. Signed-off-by: Alastair D'Silva --- drivers/misc/cxl/api.c | 15 --- drivers/misc/cxl/base.c| 17 - drivers/misc/cxl/co

[PATCH v2 04/10] Revert "cxl: Add kernel APIs to get & set the max irqs per context"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit 79384e4b71240abf50c375eea56060b0d79c242a. Signed-off-by: Alastair D'Silva --- drivers/misc/cxl/api.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/drivers/misc/cxl

[PATCH v2 05/10] Revert "cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit b0b5e5918ad1babfd1d43d98c7281926a7b57b9f. Signed-off-by: Alastair D'Silva --- drivers/misc/cxl/Kconfig | 8 -- drivers/misc/cxl/pci.c | 236 +++ include/misc

[PATCH v2 06/10] Revert "cxl: Add support for using the kernel API with a real PHB"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit 317f5ef1b363417b6f1e93b90dfd2ffd6be6e867. Signed-off-by: Alastair D'Silva --- drivers/misc/cxl/pci.c | 3 --- drivers/misc/cxl/vphb.c | 16 ++-- 2 files changed, 2 insertions(+), 17 d

[PATCH v2 07/10] Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. This reverts commit 4361b03430d685610e5feea3ec7846e8b9ae795f. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-pci.h| 7 -- arch/powerpc/platforms/powernv/pci-cxl.c | 115 ---

[PATCH v2 08/10] Revert "cxl: Add cxl_slot_is_supported API"

2018-06-28 Thread Frederic Barrat
Remove abandonned capi support for the Mellanox CX4. This reverts commit 4e56f858bdde5cbfb70f61baddfaa56a8ed851bf. Signed-off-by: Frederic Barrat --- drivers/misc/cxl/pci.c | 37 - include/misc/cxl.h | 15 --- 2 files changed, 52 deletions

[PATCH v2 09/10] Revert "cxl: Allow a default context to be associated with an external pci_dev"

2018-06-28 Thread Frederic Barrat
Remove abandonned capi support for the Mellanox CX4. This reverts commit a19bd79e31769626d288cc016e21a31b6f47bf6f. Signed-off-by: Frederic Barrat --- drivers/misc/cxl/Makefile | 2 +- drivers/misc/cxl/base.c | 35 --- drivers/misc/cxl/cxl.h| 6

[PATCH v2 10/10] cxl: Remove abandonned capi support for the Mellanox CX4, final cleanup

2018-06-28 Thread Frederic Barrat
Remove a few XSL/CX4 oddities which are no longer needed. A simple revert of the initial commits was not possible (or not worth it) due to the history of the code. Signed-off-by: Frederic Barrat --- drivers/misc/cxl/context.c | 2 +- drivers/misc/cxl/cxl.h | 12 -- drivers/misc/cxl

[PATCH v2 01/10] Revert "cxl: Add kernel API to allow a context to operate with relocate disabled"

2018-06-28 Thread Frederic Barrat
From: Alastair D'Silva Remove abandonned capi support for the Mellanox CX4. The symbol 'cxl_set_translation_mode' is never called, so ctx->real_mode is always false. This reverts commit 7a0d85d313c2066712e530e668bc02bb741a685c. Signed-off-by: Alastair D'Silva --- drivers/misc/cxl/api.c| 1

Re: [PATCH] cxl: Fix wrong comparison in cxl_adapter_context_get()

2018-07-05 Thread Frederic Barrat
f an active context exists") Reported-by: Dan Carpenter Signed-off-by: Vaibhav Jain --- Acked-by: Frederic Barrat drivers/misc/cxl/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c index c1ba0d42cbc8..e0f29

[PATCH] powerpc/64s/radix: Fix missing global invalidations when removing copro

2018-07-31 Thread Frederic Barrat
ing first, before updating the 'copros' counter, so that invalidations will be global. Fixes: 0cef77c7798a ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/mmu_context.h | 33 ++

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

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

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

<    1   2   3   4   5   6   7   8   >