Re: [PATCH] MAINTAINERS: cxl: update maintainership

2017-06-28 Thread Ian Munsie
Acked-by: Ian Munsie Excerpts from andrew.donnellan's message of 2017-06-28 17:22:30 +1000: > As Ian's stepping down from his maintainer role now that he's leaving IBM, > Frederic has asked me to add myself to the cxl maintainer list. Updating > accordingly. > >

[PATCH] MAINTAINERS: Remove myself as cxl maintainer

2017-06-27 Thread Ian Munsie
From: Ian Munsie I am no longer employed by IBM and will no longer have access to cxl hardware, so remove myself as a cxl maintainer. If anyone needs to contact me in the future, please use my personal email address darkstarsw...@gmail.com Signed-off-by: Ian Munsie Cc: Frederic Barrat Cc

Re: [PATCH v2] cxl: fix build when CONFIG_DEBUG_FS=n

2017-02-01 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: prevent read/write to AFU config space while AFU not configured

2016-12-05 Thread Ian Munsie
Acked-by: Ian Munsie Looks like a reasonable solution > Pradipta found this while doing testing for cxlflash. I've tested this > patch and I'm satisfied that it solves the issue, but I've asked Pradipta > to test it a bit further. :)

Re: [PATCH] cxl: drop duplicate header sched.h

2016-11-23 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: fix coccinelle warnings

2016-11-22 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-11-23 18:06:59 +1100: > On 23/11/16 17:49, Ian Munsie wrote: > > Most of these look fine > > > >> -return debugfs_create_file(name, mode, parent, (void __force *)value, > >> &fops_io_x64); > >>

Re: [PATCH] cxl: fix coccinelle warnings

2016-11-22 Thread Ian Munsie
Most of these look fine > -return debugfs_create_file(name, mode, parent, (void __force *)value, > &fops_io_x64); > +return debugfs_create_file_unsafe(name, mode, parent, > + (void __force *)value, &fops_io_x64); Just wondering what this one is about? Cheers, -Ian

Re: [PATCH] cxl: Fix memory allocation failure test

2016-11-15 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: Fix error handling

2016-11-15 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: Fix error handling

2016-11-15 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] powerpc/mm/coproc: Handle bad address on coproc slb fault

2016-11-15 Thread Ian Munsie
Reviewed-by: Ian Munsie

Re: [PATCH v2] cxl: Flush PSL cache before resetting the adapter

2016-10-04 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: Flush PSL cache before resetting the adapter

2016-10-03 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs

2016-08-18 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: fix NULL dereference in cxl_context_init() on PowerVM guests

2016-07-27 Thread Ian Munsie
Whoops! Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] cxl: add device ID for Mellanox ConnectX-4

2016-07-24 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] cxl: fix sparse warnings

2016-07-24 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH v2] powerpc/powernv: fix pci-cxl.c build when CONFIG_MODULES=n

2016-07-18 Thread Ian Munsie
From: Ian Munsie pnv_cxl_enable_phb_kernel_api() grabs a reference to the cxl module to prevent it from being unloaded after the PHB has been switched to CX4 mode. This breaks the build when CONFIG_MODULES=n as module_mutex doesn't exist. However, if we don't have modules, we don

Re: [PATCH] cxl: add option to enable -DDEBUG

2016-07-18 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH -next] cxl: Use for_each_compatible_node() macro

2016-07-13 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 15/15] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-13 Thread Ian Munsie
, CONFIG_CXL_BIMODAL, with a dependency on the pnv_php driver. Refactor existing code that touches the mode control register in the regular single mode case into a new function, setup_cxl_protocol_area(). Co-authored-by: Ian Munsie Cc: Gavin Shan Signed-off-by: Andrew Donnellan Signed-off-by: Ian Munsie

[PATCH 14/15] PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state

2016-07-13 Thread Ian Munsie
igned-off-by: Ian Munsie Acked-by: Gavin Shan --- drivers/pci/hotplug/pnv_php.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 2d2f704..e6245b0 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/ho

[PATCH 13/15] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-13 Thread Ian Munsie
definition of struct pnv_php_slot, to asm/pnv-pci.h. Cc: Gavin Shan Cc: linux-...@vger.kernel.org Cc: Bjorn Helgaas Signed-off-by: Andrew Donnellan Signed-off-by: Ian Munsie Acked-by: Gavin Shan --- V1->V2: - Dropped extraneous "select HOTPLUG_PCI_POWERNV_BASE" in Kconfig,

[PATCH 11/15] cxl: Add support for interrupts on the Mellanox CX4

2016-07-13 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 in cxl mode uses a hybrid interrupt model, where interrupts are routed from the networking hardware to the XSL using the MSIX table, and from there will be transformed back into an MSIX interrupt using the cxl style interrupts (i.e. using IVTE entries and ranges

[PATCH 12/15] cxl: Workaround PE=0 hardware limitation in Mellanox CX4

2016-07-13 Thread Ian Munsie
From: Ian Munsie The CX4 card cannot cope with a context with PE=0 due to a hardware limitation, resulting in: [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 [ 34.166580] mlx5_core :01:00.1: Failed allocating uar, aborting Since the kernel API allocates a

[PATCH 10/15] cxl: Add preliminary workaround for CX4 interrupt limitation

2016-07-13 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 has a hardware limitation where only 4 bits of the AFU interrupt number can be passed to the XSL when sending an interrupt, limiting it to only 15 interrupts per context (AFU interrupt number 0 is invalid). In order to overcome this, we will allocate additional

[PATCH 09/15] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-13 Thread Ian Munsie
From: Ian Munsie These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware limitation, which will be used in a future patch. Signed-off-by: Ian

[PATCH 08/15] cxl: Add support for using the kernel API with a real PHB

2016-07-13 Thread Ian Munsie
From: Ian Munsie This hooks up support for using the kernel API with a real PHB. After the AFU initialisation has completed it calls into the PHB code to pass it the AFU that will be used by other peer physical functions on the adapter. The cxl_pci_to_afu API is extended to work with peer PCI

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

2016-07-13 Thread Ian Munsie
From: Ian Munsie This adds support for the peer model of the cxl kernel api to the PowerNV PHB, in which physical function 0 represents the cxl function on the card (an XSL in the case of the CX4), which other physical functions will use for memory access and interrupt services. It is referred

[PATCH 06/15] cxl: Do not create vPHB if there are no AFU configuration records

2016-07-13 Thread Ian Munsie
From: Ian Munsie The vPHB model of the cxl kernel API is a hierarchy where the AFU is represented by the vPHB, and it's AFU configuration records are exposed as functions under that vPHB. If there are no AFU configuration records we will create a vPHB with nothing under it, which is a was

[PATCH 05/15] cxl: Allow a default context to be associated with an external pci_dev

2016-07-13 Thread Ian Munsie
From: Ian Munsie The cxl kernel API has a concept of a default context associated with each PCI device under the virtual PHB. The Mellanox CX4 will also use the cxl kernel API, but it does not use a virtual PHB - rather, the AFU appears as a physical function as a peer to the networking

[PATCH 03/15] cxl: Enable bus mastering for devices using CAPP DMA mode

2016-07-13 Thread Ian Munsie
From: Ian Munsie Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus master to be enabled in order for the CAPI traffic to flow. This should be harmless to enable for other cxl devices, so unconditionally enable it in the adapter init flow. Signed-off-by: Ian Munsie Reviewed

[PATCH 04/15] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-13 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 uses a model where the AFU is one physical function of the device, and is used by other peer physical functions of the same device. This will require those other devices to grab a reference on the AFU when they are initialised to make sure that it does not go

[PATCH 02/15] cxl: Add cxl_slot_is_supported API

2016-07-13 Thread Ian Munsie
From: Ian Munsie This extends the check that the adapter is in a CAPI capable slot so that it may be called by external users in the kernel API. This will be used by the upcoming Mellanox CX4 support, which needs to know ahead of time if the card can be switched to cxl mode so that it can leave

[PATCH 01/15] powerpc/powernv: Split cxl code out into a separate file

2016-07-13 Thread Ian Munsie
From: Ian Munsie The support for using the Mellanox CX4 in cxl mode will require additions to the PHB code. In preparation for this, move the existing cxl code out of pci-ioda.c into a separate pci-cxl.c file to keep things more organised. Signed-off-by: Ian Munsie Reviewed-by: Andrew

[PATCH v3] powerpc / cxl: Add support for the Mellanox CX4 in cxl mode

2016-07-13 Thread Ian Munsie
an for pointing it out (Patch 13) - Added new error label for error paths calling pci_dev_put() - suggested by Ian Munsie (Patch 15) - Added newline at end of Kconfig (Patch 15) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.o

Re: [PATCH 05/15] cxl: Allow a default context to be associated with an external pci_dev

2016-07-13 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-07-13 15:52:45 +1000: > > +bool _cxl_pci_associate_default_context(struct pci_dev *dev, struct > > cxl_afu *afu) > > If we're sharing these functions between the vPHB and peer models, do we > have a better place than vphb.c for them? Sure, I migh

Re: [PATCH 07/15] powerpc/powernv: Add support for the cxl kernel api on the real phb

2016-07-13 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-07-12 20:39:13 +1000: > Some comments below - with those addressed: > > Reviewed-by: Andrew Donnellan Thanks for the review :) > > V1->V2: > > - Add an explanation of the peer model to the commit message, > > and a comment above the pnv

[PATCH 15/15] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-11 Thread Ian Munsie
, CONFIG_CXL_BIMODAL, with a dependency on the pnv_php driver. Refactor existing code that touches the mode control register in the regular single mode case into a new function, setup_cxl_protocol_area(). Co-authored-by: Ian Munsie Cc: Gavin Shan Signed-off-by: Andrew Donnellan Signed-off-by: Ian Munsie

[PATCH 14/15] PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state

2016-07-11 Thread Ian Munsie
igned-off-by: Ian Munsie Acked-by: Gavin Shan --- drivers/pci/hotplug/pnv_php.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 2d2f704..e6245b0 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/ho

[PATCH 10/15] cxl: Add preliminary workaround for CX4 interrupt limitation

2016-07-11 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 has a hardware limitation where only 4 bits of the AFU interrupt number can be passed to the XSL when sending an interrupt, limiting it to only 15 interrupts per context (AFU interrupt number 0 is invalid). In order to overcome this, we will allocate additional

[PATCH 08/15] cxl: Add support for using the kernel API with a real PHB

2016-07-11 Thread Ian Munsie
From: Ian Munsie This hooks up support for using the kernel API with a real PHB. After the AFU initialisation has completed it calls into the PHB code to pass it the AFU that will be used by other peer physical functions on the adapter. The cxl_pci_to_afu API is extended to work with peer PCI

[PATCH 13/15] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-11 Thread Ian Munsie
definition of struct pnv_php_slot, to asm/pnv-pci.h. Cc: Gavin Shan Cc: linux-...@vger.kernel.org Cc: Bjorn Helgaas Signed-off-by: Andrew Donnellan Signed-off-by: Ian Munsie Acked-by: Gavin Shan --- V1->V2: - Dropped extraneous "select HOTPLUG_PCI_POWERNV_BASE" in Kconfig,

[PATCH 12/15] cxl: Workaround PE=0 hardware limitation in Mellanox CX4

2016-07-11 Thread Ian Munsie
From: Ian Munsie The CX4 card cannot cope with a context with PE=0 due to a hardware limitation, resulting in: [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 [ 34.166580] mlx5_core :01:00.1: Failed allocating uar, aborting Since the kernel API allocates a

[PATCH 05/15] cxl: Allow a default context to be associated with an external pci_dev

2016-07-11 Thread Ian Munsie
From: Ian Munsie The cxl kernel API has a concept of a default context associated with each PCI device under the virtual PHB. The Mellanox CX4 will also use the cxl kernel API, but it does not use a virtual PHB - rather, the AFU appears as a physical function as a peer to the networking

[PATCH 11/15] cxl: Add support for interrupts on the Mellanox CX4

2016-07-11 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 in cxl mode uses a hybrid interrupt model, where interrupts are routed from the networking hardware to the XSL using the MSIX table, and from there will be transformed back into an MSIX interrupt using the cxl style interrupts (i.e. using IVTE entries and ranges

[PATCH 09/15] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-11 Thread Ian Munsie
From: Ian Munsie These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware limitation, which will be used in a future patch. Signed-off-by: Ian

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

2016-07-11 Thread Ian Munsie
From: Ian Munsie This adds support for the peer model of the cxl kernel api to the PowerNV PHB, in which physical function 0 represents the cxl function on the card (an XSL in the case of the CX4), which other physical functions will use for memory access and interrupt services. It is referred

[PATCH 06/15] cxl: Do not create vPHB if there are no AFU configuration records

2016-07-11 Thread Ian Munsie
From: Ian Munsie The vPHB model of the cxl kernel API is a hierarchy where the AFU is represented by the vPHB, and it's AFU configuration records are exposed as functions under that vPHB. If there are no AFU configuration records we will create a vPHB with nothing under it, which is a was

[PATCH v2] powerpc / cxl: Add support for the Mellanox CX4 in cxl mode

2016-07-11 Thread Ian Munsie
sion. Thanks to Gavin Shan for pointing it out (Patch 13) - Added new error label for error paths calling pci_dev_put() - suggested by Ian Munsie (Patch 15) - Added newline at end of Kconfig (Patch 15) ___ Linuxppc-dev mailing li

[PATCH 04/15] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-11 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 uses a model where the AFU is one physical function of the device, and is used by other peer physical functions of the same device. This will require those other devices to grab a reference on the AFU when they are initialised to make sure that it does not go

[PATCH 03/15] cxl: Enable bus mastering for devices using CAPP DMA mode

2016-07-11 Thread Ian Munsie
From: Ian Munsie Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus master to be enabled in order for the CAPI traffic to flow. This should be harmless to enable for other cxl devices, so unconditionally enable it in the adapter init flow. Signed-off-by: Ian Munsie Reviewed

[PATCH 02/15] cxl: Add cxl_slot_is_supported API

2016-07-11 Thread Ian Munsie
From: Ian Munsie This extends the check that the adapter is in a CAPI capable slot so that it may be called by external users in the kernel API. This will be used by the upcoming Mellanox CX4 support, which needs to know ahead of time if the card can be switched to cxl mode so that it can leave

[PATCH 01/15] powerpc/powernv: Split cxl code out into a separate file

2016-07-11 Thread Ian Munsie
From: Ian Munsie The support for using the Mellanox CX4 in cxl mode will require additions to the PHB code. In preparation for this, move the existing cxl code out of pci-ioda.c into a separate pci-cxl.c file to keep things more organised. Signed-off-by: Ian Munsie Reviewed-by: Andrew

Re: [PATCH 14/14] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-11 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-07-07 18:15:06 +1000: > On 07/07/16 16:44, Andrew Donnellan wrote: > > We can match the vendor, device ID *and* class code - unfortunately > > there isn't a macro for this, which makes it a little bit less > > aesthetically pleasing, but I'm pretty s

Re: [PATCH 07/14] cxl: Add support for using the kernel API with a real PHB

2016-07-06 Thread Ian Munsie
Excerpts from Frederic Barrat's message of 2016-07-06 20:30:41 +0200: > > > @@ -1572,6 +1575,9 @@ static pci_ers_result_t cxl_pci_error_detected(struct > > pci_dev *pdev, > >*/ > > for (i = 0; i < adapter->slices; i++) { > > afu = adapter->afu[i]; > > +

Re: [PATCH 06/14] powerpc/powernv: Add support for the cxl kernel api on the real phb

2016-07-06 Thread Ian Munsie
Excerpts from Frederic Barrat's message of 2016-07-06 19:38:18 +0200: > > > +/* No special handling for cxl function: */ > > +if (PCI_FUNC(dev->devfn) == 0) > > +return true; > > I believe that is the first time we're getting a hint of the black magic > which is going to occur wh

Re: [PATCH 14/14] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-06 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-07-07 11:18:37 +1000: > > This is to balance the 'get' done in cxl_check_and_switch_mode(), right? > > A comment wouldn't hurt. I think we're missing the 'put' on the first > > error path above (!bridge). > > Yep, it's to balance the pci_dev_get() i

Re: [PATCH 10/14] cxl: Add support for interrupts on the Mellanox CX4

2016-07-06 Thread Ian Munsie
Excerpts from Frederic Barrat's message of 2016-07-06 20:41:42 +0200: > I think we want: > if (WARN_ON(hwirq <= 0)) > cxl_find_afu_irq() returns 0 if doesn't find the irq, which is not > supposed to happen here. Good catch - will fix in v2. Cheers, -Ian _

Re: [PATCH 08/14] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-06 Thread Ian Munsie
Excerpts from Frederic Barrat's message of 2016-07-06 20:11:48 +0200: > > Le 04/07/2016 15:22, Ian Munsie a écrit : > > From: Ian Munsie > > > > These APIs will be used by the Mellanox CX4 support. While they function > > standalone to configure existing beh

Re: [PATCH v3] cxl: Refine slice error debug messages

2016-07-05 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2] cxl: Refine slice error debug messages

2016-07-04 Thread Ian Munsie
I agree with Mikey - this needs a description. But otherwise it looks good to me, and I'll be happy if it stops any more AFU developers from reporting their bugs to us, so happy to add this now: Acked-by: Ian Munsie Excerpts from Philippe Bergheaud's message of 2016-07-04 17:0

[PATCH 10/14] cxl: Add support for interrupts on the Mellanox CX4

2016-07-04 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 in cxl mode uses a hybrid interrupt model, where interrupts are routed from the networking hardware to the XSL using the MSIX table, and from there will be transformed back into an MSIX interrupt using the cxl style interrupts (i.e. using IVTE entries and ranges

[PATCH 04/14] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-04 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 uses a model where the AFU is one physical function of the device, and is used by other peer physical functions of the same device. This will require those other devices to grab a reference on the AFU when they are initialised to make sure that it does not go

[PATCH 02/14] cxl: Add cxl_slot_is_supported API

2016-07-04 Thread Ian Munsie
From: Ian Munsie This extends the check that the adapter is in a CAPI capable slot so that it may be called by external users in the kernel API. This will be used by the upcoming Mellanox CX4 support, which needs to know ahead of time if the card can be switched to cxl mode so that it can leave

[PATCH 14/14] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-04 Thread Ian Munsie
, CONFIG_CXL_BIMODAL, with a dependency on the pnv_php driver. Refactor existing code that touches the mode control register in the regular single mode case into a new function, setup_cxl_protocol_area(). Co-authored-by: Ian Munsie Cc: Gavin Shan Signed-off-by: Andrew Donnellan Reviewed-by: Gavin Shan

[PATCH 13/14] PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state

2016-07-04 Thread Ian Munsie
From: Andrew Donnellan When calling pnv_php_set_slot_power_state() with state == OPAL_PCI_SLOT_OFFLINE, remove devices from the device tree as if we're dealing with OPAL_PCI_SLOT_POWER_OFF. Cc: Gavin Shan Cc: linux-...@vger.kernel.org Cc: Bjorn Helgaas Signed-off-by: Andrew Donnellan Acked-by

[PATCH 12/14] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-04 Thread Ian Munsie
From: Andrew Donnellan The cxl driver will use infrastructure from pnv_php to handle device tree updates when switching bi-modal CAPI cards into CAPI mode. To enable this, export pnv_php_find_slot() and pnv_php_set_slot_power_state(), and add corresponding declarations, as well as the definition

[PATCH 11/14] cxl: Workaround PE=0 hardware limitation in Mellanox CX4

2016-07-04 Thread Ian Munsie
From: Ian Munsie The CX4 card cannot cope with a context with PE=0 due to a hardware limitation, resulting in: [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 [ 34.166580] mlx5_core :01:00.1: Failed allocating uar, aborting Since the kernel API allocates a

[PATCH 09/14] cxl: Add preliminary workaround for CX4 interrupt limitation

2016-07-04 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 has a hardware limitation where only 4 bits of the AFU interrupt number can be passed to the XSL when sending an interrupt, limiting it to only 15 interrupts per context (AFU interrupt number 0 is invalid). In order to overcome this, we will allocate additional

[PATCH 08/14] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-04 Thread Ian Munsie
From: Ian Munsie These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware limitation, which will be used in a future patch. Signed-off-by: Ian

[PATCH 07/14] cxl: Add support for using the kernel API with a real PHB

2016-07-04 Thread Ian Munsie
From: Ian Munsie This hooks up support for using the kernel API with a real PHB. After the AFU initialisation has completed it calls into the PHB code to pass it the AFU that will be used by other peer physical functions on the adapter. The cxl_pci_to_afu API is extended to work with peer PCI

[PATCH 06/14] powerpc/powernv: Add support for the cxl kernel api on the real phb

2016-07-04 Thread Ian Munsie
From: Ian Munsie This adds support for the peer model of the cxl kernel api to the PowerNV PHB, and exports APIs to enable the mode, check if a PCI device is attached to a PHB in this mode, and to set and get the peer AFU for this mode. The cxl driver will enable this mode for supported cards

[PATCH 05/14] cxl: Allow a default context to be associated with an external pci_dev

2016-07-04 Thread Ian Munsie
From: Ian Munsie The cxl kernel API has a concept of a default context associated with each PCI device under the virtual PHB. The Mellanox CX4 will also use the cxl kernel API, but it does not use a virtual PHB - rather, the AFU appears as a physical function as a peer to the networking

[PATCH 03/14] cxl: Enable bus mastering for devices using CAPP DMA mode

2016-07-04 Thread Ian Munsie
From: Ian Munsie Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus master to be enabled in order for the CAPI traffic to flow. This should be harmless to enable for other cxl devices, so unconditionally enable it in the adapter init flow. Signed-off-by: Ian Munsie

[PATCH 01/14] powerpc/powernv: Split cxl code out into a separate file

2016-07-04 Thread Ian Munsie
From: Ian Munsie The support for using the Mellanox CX4 in cxl mode will require additions to the PHB code. In preparation for this, move the existing cxl code out of pci-ioda.c into a separate pci-cxl.c file to keep things more organised. Signed-off-by: Ian Munsie --- arch/powerpc/platforms

powerpc / cxl: Add support for the Mellanox CX4 in cxl mode

2016-07-04 Thread Ian Munsie
This series adds support for the Mellanox CX4 network adapter operating in cxl mode to the cxl driver and the PowerNV PHB code. The Mellanox developers will submit a separate patch series that makes use of this in the mlx5 driver. The CX4 card can operate in either pci mode, or cxl mode. In cxl mo

Re: [PATCH] cxl: remove dead Kconfig options

2016-07-04 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2] cxl: Ignore CAPI adapters misplaced in switched slots

2016-07-03 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] cxl: make base more explicitly non-modular

2016-07-03 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] powerpc/fadump: Fix compile error due to missing semicolon

2016-06-30 Thread Ian Munsie
From: Ian Munsie The commit "powerpc/fadump: trivial fix of spelling mistake, clean up message" removed a semicolon causing the following compile failure: arch/powerpc/kernel/fadump.c: In function ‘fadump_invalidate_dump’: arch/powerpc/kernel/fadump.c:1014:2: error: expected

Re: [PATCH] cxl: Ignore CAPI adapters misplaced in switched slots

2016-06-30 Thread Ian Munsie
Thanks Philippe - this looks like a decent solution to the problem (and I intend to use this for the upcoming cx4 support as well). Acked-by: Ian Munsie Excerpts from Philippe Bergheaud's message of 2016-06-30 13:45:37 +0200: > One should not attempt to switch a PHB into CAPI mode if

[PATCH v2] cxl: Fix bug where AFU disable operation had no effect

2016-06-30 Thread Ian Munsie
From: Ian Munsie The AFU disable operation has a bug where it will not clear the enable bit and therefore will have no effect. To date this has likely been masked by fact that we perform an AFU reset before the disable, which also has the effect of clearing the enable bit, making the following

Re: [PATCH 1/2] cxl: Fix bug where AFU disable operation had no effect

2016-06-30 Thread Ian Munsie
Excerpts from Frederic Barrat's message of 2016-06-30 17:50:00 +0200: > > Le 30/06/2016 17:32, Ian Munsie a écrit : > >> For dedicated mode, the CAIA recommends an explicit reset of the AFU > >> >(section 2.1.1). > > True, I had forgotten that procedure was a

Re: [PATCH 1/2] cxl: Fix bug where AFU disable operation had no effect

2016-06-30 Thread Ian Munsie
Excerpts from Frederic Barrat's message of 2016-06-30 16:19:54 +0200: > I'm not a big fan of the new "clear" argument, which forces us to pass > an extra 0 most of the time. Why not always clearing the "action" bits > of the register before applying the command? They are mutually > exclusive, so

Re: [PATCH] cxl: Fix NULL pointer dereference on kernel contexts with no AFU interrupts

2016-06-29 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2016-06-30 15:15:02 +1000: > On 30/06/16 15:00, Michael Ellerman wrote: > > On Thu, 2016-06-30 at 08:28 +1000, Andrew Donnellan wrote: > >> On 30/06/16 04:55, Ian Munsie wrote: > >>> > >>> From: Ian Munsie

[PATCH] cxl: Fix NULL pointer dereference on kernel contexts with no AFU interrupts

2016-06-29 Thread Ian Munsie
From: Ian Munsie If a kernel context is initialised and does not have any AFU interrupts allocated it will cause a NULL pointer dereference when the context is detached since the irq_names list will not have been initialised. Move the initialisation of the irq_names list into the

[PATCH 2/2] cxl: Workaround XSL bug that does not clear the RA bit after a reset

2016-06-29 Thread Ian Munsie
From: Ian Munsie An issue was noted in our debug logs where the XSL would leave the RA bit asserted after an AFU reset operation, which would effectively prevent further AFU reset operations from working. Workaround the issue by clearing the RA bit with an MMIO write if it is still asserted

[PATCH 1/2] cxl: Fix bug where AFU disable operation had no effect

2016-06-29 Thread Ian Munsie
From: Ian Munsie The AFU disable operation has a bug where it will not clear the enable bit and therefore will have no effect. To date this has likely been masked by fact that we perform an AFU reset before the disable, which also has the effect of clearing the enable bit, making the following

[PATCH 2/2] cxl: Fix allocating a minimum of 2 pages for the SPA

2016-06-29 Thread Ian Munsie
From: Ian Munsie The Scheduled Process Area is allocated dynamically with enough pages to fit at least as many processes as the AFU descriptor indicated. Since the calculation is non-trivial, it does this by calculating how many processes could fit in an allocation of a given order, and

[PATCH 1/2] cxl: Fix allowing bogus AFU descriptors with 0 maximum processes

2016-06-29 Thread Ian Munsie
From: Ian Munsie If the AFU descriptor of an AFU directed AFU indicates that it supports 0 maximum processes, we will accept that value and attempt to use it. The SPA will still be allocated (with 2 pages due to another minor bug and room for 958 processes), and when a context is allocated we

Re: [v6, 1/2] cxl: Add mechanism for delivering AFU driver specific events

2016-06-20 Thread Ian Munsie
Excerpts from Vaibhav Jain's message of 2016-06-20 14:20:16 +0530: > > +int cxl_unset_driver_ops(struct cxl_context *ctx) > > +{ > > +if (atomic_read(&ctx->afu_driver_events)) > > +return -EBUSY; > > + > > +ctx->afu_driver_ops = NULL; > Need a write memory barrier so that afu_driver

Re: [PATCH] powerpc/mm: Prevent unlikely crash in copro_calculate_slb()

2016-06-20 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] cxl: Make vPHB device node match adapter's

2016-06-15 Thread Ian Munsie
This could probably use a description in the commit message, perhaps including output showing the before/after difference this makes to lsvpd, but otherwise it looks fine to me. @Mikey - this look OK to you? Acked-by: Ian Munsie Excerpts from Frederic Barrat's message of 2016-06-15 16:

[PATCH, RFC] cxl: Add support for CAPP DMA mode

2016-06-07 Thread Ian Munsie
From: Ian Munsie This adds support for using CAPP DMA mode, which is required for XSL based cards such as the Mellanox CX4 to function. This is currently an RFC as it depends on the corresponding support to be merged into skiboot first, which was submitted here: http://patchwork.ozlabs.org

[PATCH] cxl: Abstract the differences between the PSL and XSL

2016-05-23 Thread Ian Munsie
ses a special DMA cxl mode, which uses a slightly different init sequence for the CAPP and PHB. The kernel support for this will be in a future patch once the corresponding support has been merged into skiboot. Co-authored-by: Ian Munsie Signed-off-by: Ian Munsie --- drivers/misc/cxl/cxl.h

[PATCH] cxl: Update process element after allocating interrupts

2016-05-23 Thread Ian Munsie
From: Ian Munsie In the kernel API, it is possible to attempt to allocate AFU interrupts after already starting a context. Since the process element structure used by the hardware is only filled out at the time the context is started, it will not be updated with the interrupt numbers that have

Re: [PATCH] cxl: Refine slice error debug messages.

2016-05-11 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH v2] cxl: Add kernel API to allow a context to operate with relocate disabled

2016-05-06 Thread Ian Munsie
From: Ian Munsie cxl devices typically access memory using an MMU in much the same way as the CPU, and each context includes a state register much like the MSR in the CPU. Like the CPU, the state register includes a bit to enable relocation, which we currently always enable. In some cases, it

Re: [PATCH] cxl: Add kernel API to allow a context to operate with relocate disabled

2016-05-06 Thread Ian Munsie
Sure thing, that actually simplifies things a great deal. Testing now and will resend shortly :) -Ian ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

  1   2   3   4   5   >