[PATCH V4 4/5] ocxl: Add mmu notifier

2020-11-25 Thread Christophe Lombard
up to match the BDF/PASID of the AFU. Acked-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/link.c | 62 +++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c index

[PATCH V4 2/5] ocxl: Initiate a TLB invalidate command

2020-11-25 Thread Christophe Lombard
to determine when the TLB Invalidate has been completed. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 51 arch/powerpc/platforms/powernv/ocxl.c | 69 +++ 2 files changed, 120 insertions(+) diff --git a/arch/powerpc

[PATCH V4 5/5] ocxl: Add new kernel traces

2020-11-25 Thread Christophe Lombard
Add specific kernel traces which provide information on mmu notifier and on pages range. Acked-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/link.c | 4 +++ drivers/misc/ocxl/trace.h | 64 +++ 2 files changed, 68 insertions

[PATCH V4 1/5] ocxl: Assign a register set to a Logical Partition

2020-11-25 Thread Christophe Lombard
r the time being, the ATSD0 set of registers is used by default. Acked-by: Frederic Barrat Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 3 ++ arch/powerpc/platforms/powernv/ocxl.c | 45 +++ 2 files changed, 48 insertions(+) diff --git a/ar

[PATCH V4 3/5] ocxl: Update the Process Element Entry

2020-11-25 Thread Christophe Lombard
Reserved 6 Acked-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/context.c | 4 +++- drivers/misc/ocxl/link.c | 4 +++- drivers/misc/ocxl/ocxl_internal.h | 9 ++--- drivers/scsi/cxlflash/ocxl_hw.c | 6 -- include

[PATCH V4 0/5] ocxl: Mmio invalidation support

2020-11-25 Thread Christophe Lombard
the PowerBus. The Shootdown commands (ATSD) will be generated using MMIO registers in the NPU/PAU and sent to the device. Signed-off-by: Christophe Lombard --- Changelog[v4] - Rebase to latest upstream. - Correct a typo in page size Changelog[v3] - Rebase to latest upstream. - Add page_size

Re: [PATCH V2 4/5] ocxl: Add mmu notifier

2020-11-24 Thread Christophe Lombard
Le 24/11/2020 à 14:45, Jason Gunthorpe a écrit : On Tue, Nov 24, 2020 at 09:17:38AM +, Christoph Hellwig wrote: @@ -470,6 +487,26 @@ void ocxl_link_release(struct pci_dev *dev, void *link_handle) } EXPORT_SYMBOL_GPL(ocxl_link_release); +static void invalidate_range(struct

[PATCH V3 5/5] ocxl: Add new kernel traces

2020-11-24 Thread Christophe Lombard
Add specific kernel traces which provide information on mmu notifier and on pages range. Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/link.c | 4 +++ drivers/misc/ocxl/trace.h | 64 +++ 2 files changed, 68 insertions(+) diff --git a/drivers/misc

[PATCH V3 1/5] ocxl: Assign a register set to a Logical Partition

2020-11-24 Thread Christophe Lombard
r the time being, the ATSD0 set of registers is used by default. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 3 ++ arch/powerpc/platforms/powernv/ocxl.c | 45 +++ 2 files changed, 48 insertions(+) diff --git a/arch/powerpc/include/asm/pnv

[PATCH V3 0/5] ocxl: Mmio invalidation support

2020-11-24 Thread Christophe Lombard
the PowerBus. The Shootdown commands (ATSD) will be generated using MMIO registers in the NPU/PAU and sent to the device. Signed-off-by: Christophe Lombard --- Changelog[v3] - Rebase to latest upstream. - Add page_size argument in pnv_ocxl_tlb_invalidate() - Remove double pointer Changelog[v2

[PATCH V3 2/5] ocxl: Initiate a TLB invalidate command

2020-11-24 Thread Christophe Lombard
to determine when the TLB Invalidate has been completed. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 51 +++ arch/powerpc/platforms/powernv/ocxl.c | 70 +++ 2 files changed, 121 insertions(+) diff --git a/arch/powerpc

[PATCH V3 4/5] ocxl: Add mmu notifier

2020-11-24 Thread Christophe Lombard
up to match the BDF/PASID of the AFU. Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/link.c | 62 +++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c index 77381dda2c45..129d4eddc4d2

[PATCH V3 3/5] ocxl: Update the Process Element Entry

2020-11-24 Thread Christophe Lombard
Reserved 6 Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/context.c | 4 +++- drivers/misc/ocxl/link.c | 4 +++- drivers/misc/ocxl/ocxl_internal.h | 9 ++--- drivers/scsi/cxlflash/ocxl_hw.c | 6 -- include/misc/ocxl.h | 2

[PATCH V2 2/5] ocxl: Initiate a TLB invalidate command

2020-11-20 Thread Christophe Lombard
to determine when the TLB Invalidate has been completed. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 50 arch/powerpc/platforms/powernv/ocxl.c | 55 +++ 2 files changed, 105 insertions(+) diff --git a/arch

[PATCH V2 5/5] ocxl: Add new kernel traces

2020-11-20 Thread Christophe Lombard
Add specific kernel traces which provide information on mmu notifier and on pages range. Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/link.c | 4 +++ drivers/misc/ocxl/trace.h | 64 +++ 2 files changed, 68 insertions(+) diff --git a/drivers/misc

[PATCH V2 4/5] ocxl: Add mmu notifier

2020-11-20 Thread Christophe Lombard
up to match the BDF/PASID of the AFU. Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/link.c | 58 +++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c index 20444db8a2bb..100bdfe9ec37

[PATCH V2 3/5] ocxl: Update the Process Element Entry

2020-11-20 Thread Christophe Lombard
Reserved 6 Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/context.c | 4 +++- drivers/misc/ocxl/link.c | 4 +++- drivers/misc/ocxl/ocxl_internal.h | 4 +++- drivers/scsi/cxlflash/ocxl_hw.c | 6 -- include/misc/ocxl.h | 2

[PATCH V2 0/5] ocxl: Mmio invalidation support

2020-11-20 Thread Christophe Lombard
the PowerBus. The Shootdown commands (ATSD) will be generated using MMIO registers in the NPU/PAU and sent to the device. Signed-off-by: Christophe Lombard --- Changelog[v2] - Rebase to latest upstream. - Create a set of smaller patches - Move the device tree parsing and ioremap

[PATCH V2 1/5] ocxl: Assign a register set to a Logical Partition

2020-11-20 Thread Christophe Lombard
r the time being, the ATSD0 set of registers is used by default. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 3 ++ arch/powerpc/platforms/powernv/ocxl.c | 48 +++ 2 files changed, 51 insertions(+) diff --git a/arch/powerpc/include/asm/pnv

[PATCH] ocxl: Mmio invalidation support

2020-11-13 Thread Christophe Lombard
commands from the PowerBus. The Shootdown commands (ATSD) will be generated using MMIO registers in the NPU/PAU and sent to the device. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 2 + arch/powerpc/platforms/powernv/ocxl.c | 19 +++ drivers/misc/ocxl/link.c

Re: [PATCH 3/3] powerpc/pseries: Fixup config space size of OpenCAPI devices

2019-11-07 Thread christophe lombard
On 05/11/2019 06:01, Andrew Donnellan wrote: On 22/10/19 6:52 pm, christophe lombard wrote: Fix up the pci config size of the OpenCAPI PCIe devices in the pseries environment. Most of OpenCAPI PCIe devices have 4096 bytes of configuration space. It's not "most of", it's "all&

Re: [PATCH 2/3] ocxl: Add pseries-specific code

2019-10-28 Thread christophe lombard
On 22/10/2019 09:52, christophe lombard wrote: pseries.c implements the guest-specific callbacks for the backend API. The hypervisor calls provide an interface to configure and interact with OpenCAPI devices. It matches the last version of the 'PAPR changes' document. The following hcalls

[PATCH 2/2] vfio/pci: Introduce OpenCAPI devices support.

2019-10-24 Thread christophe lombard
value, requested to configure the process element in the Scheduled Process Area, is not available in the QEMU environment. This implies getting it from the host through the iommu group. Signed-off-by: Christophe Lombard --- drivers/vfio/pci/Kconfig | 7 + drivers/vfio/pci/Makefile

[PATCH 0/2] vfio pci: Add support for OpenCAPI devices

2019-10-24 Thread christophe lombard
:00:00.0,addr=2.0 -device vfio-pci,multifunction=on,host=0007:00:00.1,addr=2.1 It has been tested in a bare-metal and QEMU environment using the memcpy and the AFP AFUs. christophe lombard (2): powerpc/powernv: Register IOMMU group for OpenCAPI devices vfio/pci: Introduce OpenCAPI devices suppor

[PATCH 1/2] powerpc/powernv: Register IOMMU group for OpenCAPI devices

2019-10-24 Thread christophe lombard
is common for each devices sharing the same domain, same bus and same slot. Signed-off-by: Christophe Lombard --- arch/powerpc/platforms/powernv/ocxl.c | 164 +- arch/powerpc/platforms/powernv/pci-ioda.c | 19 ++- arch/powerpc/platforms/powernv/pci.h | 13 ++ 3 files

[PATCH 2/3] ocxl: Add pseries-specific code

2019-10-22 Thread christophe lombard
are common to all hcalls (buid and config_addr) that will be used to allow QEMU to recover the PCI device. Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/Makefile| 1 + drivers/misc/ocxl/main.c | 4 + drivers/misc/ocxl/ocxl_internal.h | 1 + drivers/misc/ocxl/pseries.c

[PATCH 0/3] ocxl: Support for an 0penCAPI device in a QEMU guest.

2019-10-22 Thread christophe lombard
describe their own definition. See struct ocxl_backend_ops. It has been tested in a bare-metal and QEMU environment using the memcpy and the AFP AFUs. christophe lombard (3): ocxl: Introduce implementation-specific API ocxl: Add pseries-specific code powerpc/pseries: Fixup config space size

[PATCH 3/3] powerpc/pseries: Fixup config space size of OpenCAPI devices

2019-10-22 Thread christophe lombard
Fix up the pci config size of the OpenCAPI PCIe devices in the pseries environment. Most of OpenCAPI PCIe devices have 4096 bytes of configuration space. Signed-off-by: Christophe Lombard --- arch/powerpc/platforms/pseries/pci.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch

[PATCH 1/3] ocxl: Introduce implementation-specific API

2019-10-22 Thread christophe lombard
the pnv_ocxl_ API for the bare-metal environment. Signed-off-by: Christophe Lombard --- drivers/misc/ocxl/Makefile| 2 + drivers/misc/ocxl/config.c| 7 ++- drivers/misc/ocxl/link.c | 31 +-- drivers/misc/ocxl/main.c | 5 ++ drivers/misc/ocxl

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

2019-10-16 Thread christophe lombard
. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 46 ++-- arch/powerpc/platforms/powernv/ocxl.c | 297 +--- drivers/misc/ocxl/afu_irq.c | 1 - drivers/misc/ocxl/link.c | 383 +++--- drivers/misc/ocxl

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

2019-10-16 Thread christophe lombard
-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 6 +- arch/powerpc/platforms/powernv/ocxl.c | 103 -- drivers/misc/ocxl/config.c| 89 +- 3 files changed, 99 insertions(+), 99 deletions(-) diff --git a/arch/powerpc/include/asm

[PATCH V2 0/2] ocxl: Move SPA and TL definitions

2019-10-16 Thread christophe lombard
the entry in the SPA. (Fred) christophe lombard (2): powerpc/powernv: ocxl move SPA definition powerpc/powernv: ocxl move TL definition arch/powerpc/include/asm/pnv-ocxl.h | 46 +-- arch/powerpc/platforms/powernv/ocxl.c | 400 +++--- drivers/misc/ocxl/afu_irq.c

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

2019-10-14 Thread christophe lombard
On 14/10/2019 12:21, Frederic Barrat wrote: 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

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

2019-10-14 Thread christophe lombard
On 14/10/2019 12:17, Frederic Barrat wrote: 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

Re: [PATCH 0/2] ocxl: Move SPA and TL definitions

2019-10-11 Thread christophe lombard
On 11/10/2019 10:06, christophe lombard wrote: On 11/10/2019 00:34, Andrew Donnellan wrote: On 10/10/19 2:11 am, christophe lombard wrote: This series moves the definition and the management of scheduled process area (SPA) and of the templates (Transaction Layer) for an ocxl card, using

Re: [PATCH 0/2] ocxl: Move SPA and TL definitions

2019-10-11 Thread christophe lombard
On 11/10/2019 00:34, Andrew Donnellan wrote: On 10/10/19 2:11 am, christophe lombard wrote: This series moves the definition and the management of scheduled process area (SPA) and of the templates (Transaction Layer) for an ocxl card, using the OCAPI interface. The code is now located

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

2019-10-09 Thread christophe lombard
-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 5 +- arch/powerpc/platforms/powernv/ocxl.c | 103 -- drivers/misc/ocxl/config.c| 89 +- 3 files changed, 99 insertions(+), 98 deletions(-) diff --git a/arch/powerpc/include/asm

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

2019-10-09 Thread christophe lombard
and create new few platform-specific calls which can be used by drivers. No functional change. Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/pnv-ocxl.h | 25 +- arch/powerpc/platforms/powernv/ocxl.c | 275 ++-- drivers/misc/ocxl/afu_irq.c | 1 - drivers

[PATCH 0/2] ocxl: Move SPA and TL definitions

2019-10-09 Thread christophe lombard
environment using the memcpy and the AFP AFUs. christophe lombard (2): powerpc/powernv: ocxl move SPA definition powerpc/powernv: ocxl move TL definition arch/powerpc/include/asm/pnv-ocxl.h | 30 +- arch/powerpc/platforms/powernv/ocxl.c | 378 +++--- drivers/misc/ocxl

Re: [PATCH] ocxl: Update for AFU descriptor template version 1.1

2019-06-19 Thread christophe lombard
. Thanks. Reviewed-by: Christophe Lombard

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

2019-01-29 Thread christophe lombard
U pointer in 'adapter->slices' [Fred] * Removed a misleading comment in code. --- Thanks Acked-by: Christophe Lombard

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

2019-01-28 Thread christophe lombard
On 25/01/2019 06:11, Vaibhav Jain wrote: 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 implementation

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

2018-08-14 Thread Christophe Lombard
xes the access to the AFU 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 Acked-by: Frederic Barrat Acked-by: Andrew Donnellan --- Changelog[v3] - Reb

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

2018-08-14 Thread christophe lombard
Le 14/08/2018 à 05:26, Michael Ellerman a écrit : Hi Christophe, The patch looks fine, just a nit about the change log: Christophe Lombard writes: The AFU Information DVSEC capability is a means to extract common, general information about all of the AFUs associated with a Function

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

2018-08-13 Thread Christophe Lombard
. Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") Cc: stable # 4.16 Signed-off-by: Christophe Lombard --- Changelog[v2] - Rebase to latest upstream. - Use pci_write_config_byte instead of pci_write_config_word --- drivers/misc/ocxl/config.c | 4 +++- 1 file

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

2018-08-13 Thread christophe lombard
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

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

2018-08-13 Thread Christophe Lombard
From: Christophe Lombard The AFU Information DVSEC capability is a means to extract common, general information about all of the AFUs associated with a Function independent of the specific functionality that each AFU provides. This patch fixes the access to the AFU Descriptor Data indexed

Re: [PATCH] cxl: disable the lazy approach for irqs in POWERVM environment.

2018-05-07 Thread christophe lombard
Le 24/03/2018 à 09:14, Benjamin Herrenschmidt a écrit : On Fri, 2018-03-23 at 17:17 +0100, christophe lombard wrote: Le 23/03/2018 à 03:14, Benjamin Herrenschmidt a écrit : On Thu, 2018-03-22 at 17:37 +0100, Christophe Lombard wrote: The cxl driver cannot disable the interrupt at the device

Re: [PATCH] cxl: Configure PSL to not use APC virtual machines

2018-05-07 Thread christophe lombard
viewed-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH v2] cxl: Set the PBCQ Tunnel BAR register when enabling capi mode

2018-04-16 Thread christophe lombard
lue any longer. This patch modifies the cxl driver to set/reset the Tunnel BAR register when entering/exiting the cxl mode, with pnv_pci_set_tunnel_bar(). Signed-off-by: Philippe Bergheaud <fe...@linux.ibm.com> --- Thanks Reviewed-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH] cxl: disable the lazy approach for irqs in POWERVM environment.

2018-03-23 Thread christophe lombard
Le 23/03/2018 à 03:14, Benjamin Herrenschmidt a écrit : On Thu, 2018-03-22 at 17:37 +0100, Christophe Lombard wrote: The cxl driver cannot disable the interrupt at the device level and has to use disable_irq[_nosync] instead. To avoid the implementation of the lazy optimisation (the interrupt

[PATCH] cxl: disable the lazy approach for irqs in POWERVM environment.

2018-03-22 Thread Christophe Lombard
'irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY)'. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- drivers/misc/cxl/guest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index f58b4b6c..dc476e1 100644 --- a/drivers/mi

[PATCH] cxl: Add new kernel traces

2018-03-13 Thread Christophe Lombard
is handle through cxllib. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- drivers/misc/cxl/cxllib.c | 3 ++ drivers/misc/cxl/fault.c | 2 + drivers/misc/cxl/irq.c| 2 +- drivers/misc/cxl/trace.h | 115 ++ 4 files chang

Re: [PATCH v10 2/2] cxl: read PHB indications from the device tree

2018-03-06 Thread christophe lombard
lly v9,v10: No change. --- Reviewed-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH v10 1/2] powerpc/powernv: Enable tunneled operations

2018-03-06 Thread christophe lombard
to its default value. Adjust opal call numbers. v10: Adjust opal call numbers to their final values. --- Reviewed-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH V6] cxl: Fix timebase synchronization status on P9

2018-02-21 Thread christophe lombard
Le 21/02/2018 à 03:43, Michael Ellerman a écrit : Christophe Lombard <clomb...@linux.vnet.ibm.com> writes: The PSL Timebase register is updated by the PSL to maintain the timebase. On P9, the Timebase value is only provided by the CAPP as received the last time a timebase request was per

[PATCH V6] cxl: Fix timebase synchronization status on P9

2018-02-20 Thread Christophe Lombard
sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is now dynamically updated according the content of the PSL Timebase register. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> Reviewed-by: Vaibhav Jain <vaib...@linux.vnet.ibm.com> Acked-by: Andrew Do

[PATCH V5] cxl: Fix timebase synchronization status on P9

2018-02-19 Thread Christophe Lombard
sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is now dynamically updated according the content of the PSL Timebase register. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- This patch applies on top of this patch: http://patchwork.ozlabs.org/patch/87

[PATCH V4] cxl: Fix timebase synchronization status on P9

2018-02-19 Thread Christophe Lombard
sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is now dynamically updated according the content of the PSL Timebase register. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- This patch applies on top of this patch: http://patchwork.ozlabs.org/patch/87

Re: [PATCH V3] cxl: Fix timebase synchronization status on P9

2018-02-19 Thread christophe lombard
Le 19/02/2018 à 07:10, Vaibhav Jain a écrit : Hi Christophe, Mostly ok with this patch. Some very minor review comments: Christophe Lombard <clomb...@linux.vnet.ibm.com> writes: --- a/drivers/misc/cxl/sysfs.c +++ b/drivers/misc/cxl/sysfs.c @@ -62,6 +62,16 @@ static s

[PATCH V3] cxl: Fix timebase synchronization status on P9

2018-02-16 Thread Christophe Lombard
sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is now dynamically updated according the content of the PSL Timebase register. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- This patch applies on top of this patch: http://patchwork.ozlabs.org/patch/87

[PATCH V2] cxl: Fix timebase synchronization status on P9

2018-02-15 Thread Christophe Lombard
sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is now dynamically updated according the content of the PSL Timebase register. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- Changelog[v2] - Missing Signed-off-by - Spaces required around the ':' ---

[PATCH] cxl: Fix timebase synchronization status on P9

2018-02-15 Thread Christophe Lombard
The PSL Timebase register is updated by the PSL to maintain the timebase. On P9, the Timebase value is only provided by the CAPP as received the last time a timebase request was performed. The timebase requests are initiated through the adapter configuration or application registers. The specific

Re: [PATCH 2/3] cxl: Introduce module parameter 'enable_psltrace'

2018-02-12 Thread christophe lombard
Le 11/02/2018 à 18:10, Vaibhav Jain a écrit : Thanks for reviewing the patch Christophe, christophe lombard <clomb...@linux.vnet.ibm.com> writes: +bool cxl_enable_psltrace = true; +module_param_named(enable_psltrace, cxl_enable_psltrace, bool, 0600); +MODULE_PARM_DESC(enable_psltrace, &q

Re: [PATCH 2/3] cxl: Introduce module parameter 'enable_psltrace'

2018-02-09 Thread christophe lombard
Le 09/02/2018 à 05:25, Vaibhav Jain a écrit : We introduce a new module parameter named 'enable_psltrace' which asks cxl to start(by default) psl-traces on an adapter as soon as its probe is finished. In case this default behavior is not needed then this module parameter can be set to '0'.

Re: [PATCH 1/3] cxl: Introduce various enums/defines for PSL9 trace arrays

2018-02-09 Thread christophe lombard
Le 09/02/2018 à 05:25, Vaibhav Jain a écrit : We introduce a new enum named cxl_psl9_traceid that represents individual trace-arrays available on PSL9. In addition a set of new defines named s CXL_PSL9_TRACESTATE_XXX are introduced that represent various states a trace-array can be in. Value of

Re: [PATCH] cxl: Remove function write_timebase_ctrl_psl9() for PSL9

2018-02-09 Thread christophe lombard
references from the code. Signed-off-by: Vaibhav Jain <vaib...@linux.vnet.ibm.com> --- drivers/misc/cxl/pci.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) Reviewed-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH] cxl: Enable NORST bit in PSL_DEBUG register for PSL9

2018-02-09 Thread christophe lombard
atures */ + cxl_p1_write(adapter, CXL_PSL9_DEBUG, 0xC000ULL); + } return 0; } Reviewed-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH v6 1/2] powerpc/powernv: Enable tunneled operations

2018-01-12 Thread christophe lombard
| 106 + 6 files changed, 118 insertions(+), 9 deletions(-) Acked-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

Re: [PATCH v6 2/2] cxl: read PHB indications from the device tree

2018-01-12 Thread christophe lombard
3 files changed, 47 insertions(+), 7 deletions(-) Acked-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

[PATCH V7] cxl: Add support for ASB_Notify on POWER9

2018-01-11 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> Reviewed-by: Philippe Bergheaud <fe...@linux.vnet.ibm.com> --- Changelog[v7] - Rebased to latest upstream. - Added boolean: "need to allocate a

[PATCH V6] cxl: Add support for ASB_Notify on POWER9

2018-01-09 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> Reviewed-by: Philippe Bergheaud <fe...@linux.vnet.ibm.com> --- Changelog[v6] - Rebased to latest upstream. - Updated the ioctl interface. - Removed

[PATCH V5] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. A next patch will handle a new kind of "compatible" property in the device-tree (PHB DT node) indicating which version of CAPI and which features are supported, instead of handling PVR values. Signed-off-by: Christop

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread christophe lombard
Le 20/12/2017 à 09:46, Vaibhav Jain a écrit : Hi Chritophe, christophe lombard <clomb...@linux.vnet.ibm.com> writes: Le 20/12/2017 à 07:31, Vaibhav Jain a écrit : EINVAL might be a better return value instead of ENODEV in this case. This return code has been already discussed (wi

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-20 Thread christophe lombard
Le 20/12/2017 à 07:31, Vaibhav Jain a écrit : Hi Christophe, Thanks for the changes to the patch. Few minor review comments: Thanks for the review. Christophe Lombard <clomb...@linux.vnet.ibm.com> writes: @@ -362,3 +363,17 @@ void cxl_context_mm_count_put(struct cxl_contex

[PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-19 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. A next patch will handle a new kind of "compatible" property in the device-tree (PHB DT node) indicating which version of CAPI and which features are supported, instead of handling PVR values. Signed-off-by: Christop

[PATCH V3] cxl: Add support for ASB_Notify on POWER9

2017-12-13 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. A next patch will handle a new kind of "compatible" property in the device-tree (PHB DT node) indicating which version of CAPI and which features are supported, instead of handling PVR values. Signed-off-by: Christop

[PATCH] cxl: Enable PCI device ID for future CAPI adapter

2017-12-05 Thread Christophe Lombard
Add support for future Coherent Accelerator device with an ID of 0x060e. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- drivers/misc/cxl/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 19969ee..5f5b9aa

[PATCH V2] cxl: Add support for ASB_Notify on POWER9

2017-12-01 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. A next patch will handle a new kind of "compatible" property in the device-tree (PHB DT node) indicating which version of CAPI and which features are supported. Signed-off-by: Christophe Lombard <clomb...@linux

Re: [PATCH v4] powerpc: Avoid signed to unsigned conversion in set_thread_tidr()

2017-11-28 Thread christophe lombard
good for me Thanks Reviewed-by: Christophe Lombard clomb...@linux.vnet.ibm.com

Re: [PATCH] cxl: Add support for ASB_Notify on POWER9

2017-11-27 Thread christophe lombard
Le 27/11/2017 à 05:03, Michael Ellerman a écrit : christophe lombard <clomb...@linux.vnet.ibm.com> writes: Le 24/11/2017 à 14:02, Benjamin Herrenschmidt a écrit : On Fri, 2017-11-24 at 11:14 +0100, christophe lombard wrote: To my knowledge, there is no property (or similar), som

Re: [PATCH] cxl: Add support for ASB_Notify on POWER9

2017-11-24 Thread christophe lombard
Le 24/11/2017 à 14:02, Benjamin Herrenschmidt a écrit : On Fri, 2017-11-24 at 11:14 +0100, christophe lombard wrote: To my knowledge, there is no property (or similar), somewhere, that indicating that the TIDR is supported or not. For the time being, if I am not wrong, the only check we have

Re: [PATCH] cxl: Add support for ASB_Notify on POWER9

2017-11-24 Thread christophe lombard
Le 23/11/2017 à 21:41, Benjamin Herrenschmidt a écrit : On Thu, 2017-11-23 at 12:05 +0100, Christophe Lombard wrote: The POWER9 core supports a new feature: ASB_Notify which requires the support of the Special Purpose Register: TIDR. The ASB_Notify command, generated by the AFU, will attempt

Re: [PATCH] cxl: Add support for ASB_Notify on POWER9

2017-11-23 Thread christophe lombard
Le 23/11/2017 à 15:16, Vaibhav Jain a écrit : Hi Christophe, Few review comments: Christophe Lombard <clomb...@linux.vnet.ibm.com> writes: + +int cxl_context_thread_tidr(struct cxl_context *ctx, int assign) +{ + int rc = 0; + + /* Clear any TIDR value assigned to the c

[PATCH] cxl: Add support for ASB_Notify on POWER9

2017-11-23 Thread Christophe Lombard
) for the current thread which will be used in the process element entry. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- arch/powerpc/kernel/process.c | 2 ++ drivers/misc/cxl/api.c| 9 + drivers/misc/cxl/context.c| 21 + drivers/mi

Re: [PATCH] powerpc/powernv: Enable tunneled operations

2017-10-31 Thread christophe lombard
kiboot prerequisites: https://patchwork.ozlabs.org/patch/829294/ [1/2] phb4: set PHB CMPM registers for tunneled operations https://patchwork.ozlabs.org/patch/829293/ [2/2] phb4: set PBCQ Tunnel BAR for tunneled operations Looks good for me. Acked-by:  Christophe Lombard

Re: [PATCH] cxl: Rework the implementation of cxl_stop_trace_psl9()

2017-10-18 Thread christophe lombard
| 38 ++ 3 files changed, 42 insertions(+), 32 deletions(-) Thanks Acked-by:  Christophe Lombard<clomb...@linux.vnet.ibm.com>

Re: [PATCH v2] cxl: Dump PSL_FIR register on PSL9 error irq

2017-10-16 Thread christophe lombard
com> --- Changelog: [v2] -> As created a different function to dump the FIR register for PSL9 (Fred) --- Thanks Acked-by:  Christophe Lombard<clomb...@linux.vnet.ibm.com>

Re: [PATCH] cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

2017-10-16 Thread christophe lombard
rrat <fbar...@linux.vnet.ibm.com> Signed-off-by: Vaibhav Jain <vaib...@linux.vnet.ibm.com> Thanks Acked-by:  Christophe Lombard<clomb...@linux.vnet.ibm.com>

Re: [PATCH] cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

2017-10-16 Thread christophe lombard
rrat <fbar...@linux.vnet.ibm.com> Signed-off-by: Vaibhav Jain <vaib...@linux.vnet.ibm.com> --- Thanks Acked-by:  Christophe Lombard<clomb...@linux.vnet.ibm.com>

Re: [PATCH V2] cxl: Fix memory page not handled

2017-09-26 Thread christophe lombard
Le 26/09/2017 à 03:44, Vaibhav Jain a écrit : Hi Christophe, A minor nitpick Christophe Lombard <clomb...@linux.vnet.ibm.com> writes: + for (dar = (addr & ~(page_size - 1)); dar < (addr + size); dar += page_size) { + if (dar < vma->vm_start || dar >

[PATCH V3] cxl: Fix memory page not handled

2017-09-26 Thread Christophe Lombard
, and the address the adapter is trying to access is never sent to the kernel for resolution. This patch reworks start address of the loop with an address aligned on the page size. In this context, the last page is not missed. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

[PATCH V2] cxl: Fix memory page not handled

2017-09-25 Thread Christophe Lombard
, and the address the adapter is trying to access is never sent to the kernel for resolution. This patch reworks start address of the loop with an address aligned on the page size. In this context, the last page is not missed. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

[PATCH] cxl: Fix memory page not handled

2017-09-22 Thread Christophe Lombard
is trying to access is never sent to the kernel for resolution. This patch updates the loop on the memory pages to be handled. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> Fixes: 3ced8d730063 ("cxl: Export library to support IBM XSL"); --- drivers/misc/c

[PATCH V3] cxl: Add support for POWER9 DD2

2017-09-08 Thread Christophe Lombard
features will be added soon: - phb reset when switching to capi mode. - cxllib update to support new functions. Signed-off-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> Acked-by: Frederic Barrat <fbar...@linux.vnet.ibm.com> --- Changelog[v3] - Update commit message Changelog[v

Re: [PATCH] cxl: Dump PSL_FIR1/2 registers on PSL9 error irq

2017-09-07 Thread christophe lombard
s good. Acked-by: Christophe Lombard <clomb...@linux.vnet.ibm.com>

[PATCH V2] cxl: Add support for POWER9 DD2

2017-09-04 Thread Christophe Lombard
-by: Christophe Lombard <clomb...@linux.vnet.ibm.com> --- Changelog[v2] - Rebase to latest upstream. - Update the function is_page_fault() --- drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/fault.c | 15 ++- drivers/misc/cxl/pci.c

Re: [PATCH] cxl: Set the valid bit in PE for dedicated mode

2017-08-28 Thread christophe lombard
Le 28/08/2017 à 06:15, Vaibhav Jain a écrit : Make sure to set the valid-bit in software-state field of the populated PE. This was earlier missing for dedicated mode AFUs, hence was causing a PSL freeze when the AFU was activated. Acked-by: Christophe Lombard <clomb...@linux.vnet.ibm.

Re: [PATCH] cxl: Add support for POWER9 DD2

2017-08-24 Thread christophe lombard
Le 24/08/2017 à 07:24, Andrew Donnellan a écrit : On 24/08/17 00:58, Christophe Lombard wrote: The PSL initialization sequence has been updated to DD2. This patch adapts to the changes, retaining compatibility with DD1. Tests performed on some of the new hardware. If we're retaining

Re: [PATCH] cxl: Add support for POWER9 DD2

2017-08-24 Thread christophe lombard
Le 24/08/2017 à 09:09, Vaibhav Jain a écrit : Hi Christophe, Christophe Lombard <clomb...@linux.vnet.ibm.com> writes: + /* For debugging with trace arrays */ + /* Configure RX trace 0 segmented mode */ + cxl_p1_write(adapter, CXL_PSL9_TRACECFG, 0x82000

  1   2   >