[PATCH v2 05/16] cxl: Isolate a few bare-metal-specific calls

2016-01-30 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --

[PATCH v2 04/16] cxl: Rename some bare-metal specific functions

2016-01-30 Thread Frederic Barrat
Rename a few functions, mostly prefixed by 'cxl_', to make clear that the implementation is 'bare-metal' specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signe

[PATCH v2 07/16] cxl: IRQ allocation for guests

2016-01-30 Thread Frederic Barrat
is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/irq.c | 69 -- 1 file changed, 55

[PATCH v2 06/16] cxl: Update cxl_irq() prototype

2016-01-30 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v2 08/16] cxl: New possible return value from hcall

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for CAPI use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 09/16] cxl: New hcalls to support CAPI adapters

2016-01-30 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v2 10/16] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v2 12/16] cxl: sysfs support for guests

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- Documentation/ABI/testing/sysfs-class-cxl | 8 +++ drivers/mis

[PATCH v2 11/16] cxl: Add guest-specific code

2016-01-30 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2

[PATCH v2 13/16] cxl: Support to flash a new image on the adapter from a guest

2016-01-30 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v2 16/16] cxl: Adapter failure handling

2016-01-30 Thread Frederic Barrat
found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v2 14/16] cxl: Parse device tree and create CAPI device(s) at boot

2016-01-30 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for CAPI devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/base.c | 25 + 1 file changed, 25 insertions(+) diff

[PATCH v2 15/16] cxl: Support the cxl kernel API from a guest

2016-01-30 Thread Frederic Barrat
-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c| 63 ++- drivers/misc/cxl/cxl.h| 6 +- drivers/misc/cxl/guest.c | 26 drivers/misc/cxl/native.c | 50 +++ drivers/misc

[PATCH v3 00/18] cxl: Add support for powerVM guest​

2016-02-06 Thread Frederic Barrat
s around CAPI hcalls for debugging v1->v2: (v1 was privately reviewed) - integrate comments from Michael Neuling and Ian Munsie - add another patch to the series: adapter failure handling - base patchset on 4.5-rc1 Frederic Barrat (18): cxl: Move common code away from bare-metal-specific f

[PATCH v3 01/18] cxl: Move common code away from bare-metal-specific files

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v3 02/18] cxl: Move bare-metal specific code to specialized files

2016-02-06 Thread Frederic Barrat
me p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h| 24 + drivers/misc/cxl/irq.c| 205 +-- drivers/misc/cxl/m

[PATCH v3 03/18] cxl: Define process problem state area at attach time only

2016-02-06 Thread Frederic Barrat
area. Remove calls to cxl_assign_psn_space during init. The function is already called on the attach paths. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers

[PATCH v3 04/18] cxl: Introduce implementation-specific API

2016-02-06 Thread Frederic Barrat
-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 10 ++-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++--- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c| 15 ++--- drivers/misc/cxl/irq.c

[PATCH v3 06/18] cxl: Isolate a few bare-metal-specific calls

2016-02-06 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --

[PATCH v3 05/18] cxl: Rename some bare-metal specific functions

2016-02-06 Thread Frederic Barrat
Rename a few functions, mostly prefixed by 'cxl_', to make clear that the implementation is 'bare-metal' specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signe

[PATCH v3 08/18] cxl: IRQ allocation for guests

2016-02-06 Thread Frederic Barrat
is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/irq.c | 69 -- 1 file changed, 55

[PATCH v3 07/18] cxl: Update cxl_irq() prototype

2016-02-06 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v3 09/18] cxl: New possible return value from hcall

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for CAPI use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 10/18] cxl: New hcalls to support CAPI adapters

2016-02-06 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v3 11/18] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v3 13/18] cxl: sysfs support for guests

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- Documentation/ABI/testing/sysfs-class-cxl | 8 +++ drivers/mis

[PATCH v3 12/18] cxl: Add guest-specific code

2016-02-06 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2

[PATCH v3 14/18] cxl: Support to flash a new image on the adapter from a guest

2016-02-06 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v3 15/18] cxl: Parse device tree and create CAPI device(s) at boot

2016-02-06 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for CAPI devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/base.c | 25 + 1 file changed, 25 insertions(+) diff

[PATCH v3 17/18] cxl: Adapter failure handling

2016-02-06 Thread Frederic Barrat
found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v3 16/18] cxl: Support the cxl kernel API from a guest

2016-02-06 Thread Frederic Barrat
: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c| 63 ++- drivers/misc/cxl/cxl.h| 6 +- drivers/misc/cxl/guest.c | 26 drivers/misc/cxl/native.c | 50 +++ drivers/misc/cxl/pci.c

[PATCH v3 18/18] cxl: Add tracepoints around the CAPI hcall

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard To ease debugging, add a few tracepoints around the CAPI hcalls. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/hcalls.c | 9 +++ drivers/misc/cxl/trace.h | 193

Re: [PATCH v3 13/18] cxl: sysfs support for guests

2016-02-09 Thread Frederic Barrat
Le 08/02/2016 04:02, Stewart Smith a écrit : Frederic Barrat writes: --- a/Documentation/ABI/testing/sysfs-class-cxl +++ b/Documentation/ABI/testing/sysfs-class-cxl @@ -183,7 +183,7 @@ Description:read only Identifies the revision level of the PSL. Users

Re: [PATCH v3 03/18] cxl: Define process problem state area at attach time only

2016-02-11 Thread Frederic Barrat
Le 10/02/2016 07:32, Ian Munsie a écrit : It might be a reasonable idea to make cxl_psa_map fail outright if it is called on a context that has not been attached yet like we do in the user api, but I trust kernel devs to get this right more than userspace so I'm not too worried :) The net ef

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Re: [PATCH v3 10/27] powerpc: Add driver for OpenCAPI Persistent Memory

2020-02-27 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This driver exposes LPC memory on OpenCAPI pmem cards as an NVDIMM, allowing the existing nvram infrastructure to be used. Namespace metadata is stored on the media itself, so scm_reserve_metadata() maps 1 section's wo

Re: [PATCH v3 10/27] powerpc: Add driver for OpenCAPI Persistent Memory

2020-02-28 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This driver exposes LPC memory on OpenCAPI pmem cards as an NVDIMM, allowing the existing nvram infrastructure to be used. Namespace metadata is stored on the media itself, so scm_reserve_metadata() maps 1 section's wo

Re: [PATCH v3 13/27] powerpc/powernv/pmem: Read the capability registers & wait for device ready

2020-03-02 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This patch reads timeouts & firmware version from the controller, and uses those timeouts to wait for the controller to report that it is ready before handing the memory over to libnvdimm. Signed-off-by: Alastair D'Sil

Re: [PATCH v3 15/27] powerpc/powernv/pmem: Add support for near storage commands

2020-03-02 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva Similar to the previous patch, this adds support for near storage commands. Signed-off-by: Alastair D'Silva --- Is any of these new functions ever called? Fred arch/powerpc/platforms/powernv/pmem/ocxl.c

Re: [PATCH v3 16/27] powerpc/powernv/pmem: Register a character device for userspace to interact with

2020-03-03 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This patch introduces a character device (/dev/ocxl-scmX) which further patches will use to interact with userspace. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/ocxl.c| 116 ++

Re: [PATCH v3 17/27] powerpc/powernv/pmem: Implement the Read Error Log command

2020-03-03 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva The read error log command extracts information from the controller's internal error log. This patch exposes this information in 2 ways: - During probe, if an error occurs & a log is available, print it to the conso

Re: [PATCH v3 18/27] powerpc/powernv/pmem: Add controller dump IOCTLs

2020-03-03 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This patch adds IOCTLs to allow userspace to request & fetch dumps of the internal controller state. This is useful during debugging or when a fatal error on the controller has occurred. Signed-off-by: Alastair D'Silv

Re: [PATCH v3 19/27] powerpc/powernv/pmem: Add an IOCTL to report controller statistics

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva The controller can report a number of statistics that are useful in evaluating the performance and reliability of the card. This patch exposes this information via an IOCTL. Signed-off-by: Alastair D'Silva --- arch

Re: [PATCH v3 20/27] powerpc/powernv/pmem: Forward events to userspace

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva Some of the interrupts that the card generates are better handled by the userspace daemon, in particular: Controller Hardware/Firmware Fatal Controller Dump Available Error Log available This patch allows a userspace a

Re: [PATCH v3 21/27] powerpc/powernv/pmem: Add an IOCTL to request controller health & perf data

2020-03-04 Thread Frederic Barrat
Le 28/02/2020 à 07:12, Andrew Donnellan a écrit : On 21/2/20 2:27 pm, Alastair D'Silva wrote: From: Alastair D'Silva When health & performance data is requested from the controller, it responds with an error log containing the requested information. This patch allows the request to me issu

Re: [PATCH v3 22/27] powerpc/powernv/pmem: Implement the heartbeat command

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva The heartbeat admin command is a simple admin command that exercises the communication mechanisms within the controller. This patch issues a heartbeat command to the card during init to ensure we can communicate with t

Re: [PATCH v3 23/27] powerpc/powernv/pmem: Add debug IOCTLs

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva These IOCTLs provide low level access to the card to aid in debugging controller/FPGA firmware. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/Kconfig | 6 + arch/powerpc/platforms/powern

Re: [PATCH v3 24/27] powerpc/powernv/pmem: Expose SMART data via ndctl

2020-03-04 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This patch retrieves proprietary formatted SMART data and makes it available via ndctl. A later contribution will be made to ndctl to parse this data. Signed-off-by: Alastair D'Silva --- Nothing new to add compared

Re: [PATCH v3 17/27] powerpc/powernv/pmem: Implement the Read Error Log command

2020-03-05 Thread Frederic Barrat
+ if (rc) + goto out; + + rc = ocxl_global_mmio_read64(ocxlpmem->ocxl_afu, +ocxlpmem- admin_command.data_offset + 0x28, +OCXL_HOST_ENDIAN, &log->wwid[1]); + if (rc) + goto out

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH 4/4] ocxl: Remove custom service to allocate interrupts

2020-04-02 Thread Frederic Barrat
We now allocate interrupts through xive directly. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 3 --- arch/powerpc/platforms/powernv/ocxl.c | 30 --- 2 files changed, 33 deletions(-) diff --git a/arch/powerpc/include/asm/pnv-ocxl.h b/arch

[PATCH 2/4] ocxl: Access interrupt trigger page from xive directly

2020-04-02 Thread Frederic Barrat
We can access the trigger page through standard APIs so let's use it and avoid saving it when allocating the interrupt. It will also allow to simplify allocation in a later patch. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/afu_irq.c | 8 ++-- 1 file changed, 6 insertions(

[PATCH 1/4] scsi: cxlflash: Access interrupt trigger page from xive directly

2020-04-02 Thread Frederic Barrat
xive is already mapping the trigger page in kernel space and it can be accessed through standard APIs, so let's reuse it and simplify the code. Signed-off-by: Frederic Barrat --- drivers/scsi/cxlflash/ocxl_hw.c | 17 +++-- drivers/scsi/cxlflash/ocxl_hw.h | 1 - 2 files chang

[PATCH v2 4/4] ocxl: Remove custom service to allocate interrupts

2020-04-03 Thread Frederic Barrat
We now allocate interrupts through xive directly. Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 3 --- arch/powerpc/platforms/powernv/ocxl.c | 30 --- 2 files changed, 33 deletions

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

2020-04-03 Thread Frederic Barrat
its custom service. Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/Kconfig | 2 +- drivers/misc/ocxl/afu_irq.c | 4 +--- drivers/misc/ocxl/link.c| 15 +++ drivers/scsi/cxlflash/ocxl_hw.c | 3 +-- include

[PATCH v2 2/4] ocxl: Access interrupt trigger page from xive directly

2020-04-03 Thread Frederic Barrat
We can access the trigger page through standard APIs so let's use it and avoid saving it when allocating the interrupt. It will also allow to simplify allocation in a later patch. Reviewed-by: Cédric Le Goater Acked-by: Andrew Donnellan Reviewed-by: Greg Kurz Signed-off-by: Frederic B

[PATCH v2 1/4] scsi: cxlflash: Access interrupt trigger page from xive directly

2020-04-03 Thread Frederic Barrat
xive is already mapping the trigger page in kernel space and it can be accessed through standard APIs, so let's reuse it and simplify the code. Signed-off-by: Frederic Barrat --- Changelog: v2: Define rc = -ENXIO on the error path (Matt) drivers/scsi/cxlflash/ocxl_hw.c

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

2020-04-03 Thread Frederic Barrat
the interrupt has been mapped, but that is not a problem with the way the code is using it. No functional change. Changelog: v2: Fix error path in patch 1 All other patches unchanged Frederic Barrat (4): scsi: cxlflash: Access interrupt trigger page from xive directly

Re: [PATCH 02/10] nvdimm: remove prototypes for nonexistent functions

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:46, Alastair D'Silva a écrit : From: Alastair D'Silva These functions don't exist, so remove the prototypes for them. Signed-off-by: Alastair D'Silva --- Reviewed-by: Frederic Barrat drivers/nvdimm/nd-core.h | 4 1 file changed, 4 dele

Re: [PATCH 03/10] powerpc: Add OPAL calls for LPC memory alloc/release

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:46, Alastair D'Silva a écrit : From: Alastair D'Silva Add OPAL calls for LPC memory alloc/release Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan --- Acked-by: Frederic Barrat arch/powerpc/include/asm/opal-api.h| 2 ++ arch/

Re: [PATCH 04/10] powerpc: Map & release OpenCAPI LPC memory

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:46, Alastair D'Silva a écrit : From: Alastair D'Silva This patch adds platform support to map & release LPC memory. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-ocxl.h | 2 ++ arch/powerpc/platforms/powernv/ocxl.c | 41 ++

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

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : From: Alastair D'Silva Tally up the LPC memory on an OpenCAPI link & allow it to be mapped Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/core.c | 10 ++ drivers/misc/ocxl/link.c | 60

Re: [PATCH 06/10] ocxl: Add functions to map/unmap LPC memory

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : From: Alastair D'Silva Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 4 +++ drivers/misc/ocxl/core.c | 50 +++ drivers/misc/ocxl/ocxl_

Re: [PATCH 10/10] ocxl: Conditionally bind SCM devices to the generic OCXL driver

2019-11-07 Thread Frederic Barrat
Le 25/10/2019 à 06:47, Alastair D'Silva a écrit : From: Alastair D'Silva This patch allows the user to bind OpenCAPI SCM devices to the generic OCXL driver. Signed-off-by: Alastair D'Silva --- I'm wondering if we should upstream this. Is it of any use outside of some serious debug sess

<    1   2   3   4   5   6   7   8   >