Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-10 Thread Frederic Barrat
On 10/03/2021 18:44, Laurent Dufour wrote: It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour --- Thanks! Acked-by: Frederic Barrat drivers/misc/cxl/fault.c | 2 +- 1 file changed, 1

Re: [PATCH v2 -next] misc: ocxl: use DEFINE_MUTEX() for mutex lock

2021-01-04 Thread Frederic Barrat
On 24/12/2020 14:24, Zheng Yongjun wrote: mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/file.c | 3 +-- 1 file changed, 1 insertion

Re: [PATCH kernel v3] genirq/irqdomain: Add reference counting to IRQs

2020-11-14 Thread Frederic Barrat
On 14/11/2020 04:37, Alexey Kardashevskiy wrote: I'll try to go through this patch over the week-end (or more probably early next week), and try to understand where our understandings differ. Great, thanks! Fred spotted a problem with irq_free_descs() not doing kobject_put() anymore and this

Re: [PATCH v2 2/2] misc: ocxl: config: Rename function attribute description

2020-11-02 Thread Frederic Barrat
on parameter 'device' description in 'get_function_0' Cc: Frederic Barrat Cc: Andrew Donnellan Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: Lee Jones --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/config.c | 2 +- 1

Re: [PATCH v2 20/39] docs: ABI: testing: make the files compatible with ReST output

2020-10-30 Thread Frederic Barrat
sting/sysfs-class-ocxl| 3 + Patches 20, 28 and 31 look good for cxl and ocxl. Acked-by: Frederic Barrat Fred

Re: [PATCH -next] ocxl: simplify the return expression of free_function_dev()

2020-09-21 Thread Frederic Barrat
Le 21/09/2020 à 15:10, Qinglang Miao a écrit : Simplify the return expression. Signed-off-by: Qinglang Miao --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/misc/ocxl/core.c b/drivers

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

2020-09-21 Thread Frederic Barrat
Le 19/09/2020 à 20:10, Sasha Levin a écrit : On Fri, Sep 18, 2020 at 08:35:06AM +0200, Frederic Barrat wrote: Le 18/09/2020 à 03:57, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] This patch is not desirable for stable, for

Re: [PATCH] ocxl: fix kconfig dependency warning for OCXL

2020-09-18 Thread Frederic Barrat
zil Yildiran --- OK, that makes sense, thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig index 6551007a066c..947294f6d7f4 100644 --- a/drivers/misc

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

2020-09-17 Thread Frederic Barrat
Le 18/09/2020 à 03:57, Sasha Levin a écrit : From: Frederic Barrat [ Upstream commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 ] This patch is not desirable for stable, for 5.4 and 4.19 (it was already flagged by autosel back in April. Not sure why it's showing again now) Fred

Re: [PATCH v2 02/12] ocxl: Change type of pasid to unsigned int

2020-06-18 Thread Frederic Barrat
Le 18/06/2020 à 17:37, Fenghua Yu a écrit : The first 3 patches clean up pasid and flag defitions to prepare for following patches. If you think this patch can be dropped, we will drop it. Yes, I think that's the case. Thanks, Fred

Re: [PATCH v2 02/12] ocxl: Change type of pasid to unsigned int

2020-06-18 Thread Frederic Barrat
Le 13/06/2020 à 02:41, Fenghua Yu a écrit : PASID is defined as "int" although it's a 20-bit value and shouldn't be negative int. To be consistent with type defined in iommu, define PASID as "unsigned int". It looks like this patch was considered because of the use of 'pasid' in variable o

Re: [PATCH] cxl: Fix kobject memleak

2020-06-02 Thread Frederic Barrat
: b087e6190ddc ("cxl: Export optional AFU configuration record in sysfs") Reported-by: Hulk Robot Signed-off-by: Wang Hai Indeed, a call to kobject_put() is needed when the init fails. Thanks! Acked-by: Frederic Barrat --- drivers/misc/cxl/sysfs.c | 2 +- 1 file changed, 1 insertion(+),

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

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

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

2019-09-19 Thread Frederic Barrat
Le 19/09/2019 à 06:55, Alastair D'Silva a écrit : On Wed, 2019-09-18 at 16:02 +0200, Frederic Barrat wrote: Le 17/09/2019 à 03:42, Alastair D'Silva a écrit : From: Alastair D'Silva Tally up the LPC memory on an OpenCAPI link & allow it to be mapped Signed-off-b

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

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

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

2019-09-18 Thread Frederic Barrat
Le 17/09/2019 à 03:43, Alastair D'Silva a écrit : From: Alastair D'Silva Add functions to map/unmap LPC memory Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 4 +++ drivers/misc/ocxl/core.c | 50 +++ drivers/misc/ocxl/link.

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

2019-09-18 Thread Frederic Barrat
Le 17/09/2019 à 03:42, Alastair D'Silva a écrit : From: Alastair D'Silva Tally up the LPC memory on an OpenCAPI link & allow it to be mapped Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/core.c | 9 + drivers/misc/ocxl/link.c | 61 +

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

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

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

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

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

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

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

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

Re: [PATCH] ocxl: do not use C++ style comments in uapi header

2019-06-04 Thread Frederic Barrat
Yamada --- Thanks! Acked-by: Frederic Barrat include/uapi/misc/ocxl.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/misc/ocxl.h b/include/uapi/misc/ocxl.h index 97937cfa3baa..6d29a60a896a 100644 --- a/include/uapi/misc/ocxl.h +++ b/include

Re: [PATCH] misc: remove redundant 'default n' from Kconfig-s

2019-05-21 Thread Frederic Barrat
lt n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz --- for cxl and ocxl: Acked-by: Frederic Barrat drivers/misc/Kconfig | 10 -- drivers/misc/altera-stapl/Kconfig |1 - drivers/misc/c2port/Kconfig |2 -- drivers/misc/cb710/K

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 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 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 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 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 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 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 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 v2 1/5] drivers/accel: Introduce subsystem

2019-01-28 Thread Frederic Barrat
Le 27/01/2019 à 05:31, Andrew Donnellan a écrit : [+ linuxppc-dev, because cxl/ocxl are handled through powerpc - please cc on future versions of this series] On 26/1/19 8:13 am, Olof Johansson wrote: We're starting to see more of these kind of devices, the current upcoming wave will likely

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

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

Re: [RESEND PATCHv2] misc: cxl: Fix possible null pointer dereference

2018-10-04 Thread Frederic Barrat
Le 04/10/2018 à 07:02, zhong jiang a écrit : It is not safe to dereference an object before a null test. It is not needed and just remove them. Ftrace can be used instead. Signed-off-by: zhong jiang --- Acked-by: Frederic Barrat drivers/misc/cxl/guest.c | 2 -- 1 file changed, 2

Re: [PATCH -next] ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait()

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

Re: [PATCH v5 5/7] ocxl: Expose the thread_id needed for wait on POWER9

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 12:06, Alastair D'Silva a écrit : -Original Message- From: Frederic Barrat Sent: Friday, 11 May 2018 7:25 PM To: Alastair D'Silva ; linuxppc-...@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; mi...@neuling

Re: [PATCH] misc: cxl: Change return type to vm_fault_t

2018-05-11 Thread Frederic Barrat
der --- It looks ok, and it passed some basic testing. Acked-by: Frederic Barrat Fred drivers/misc/cxl/context.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/misc/cxl/context.c b/drivers/misc/cxl/context.c index 7ff315a..c6ec872 100644 --- a/dri

Re: [PATCH v5 7/7] ocxl: Document new OCXL IOCTLs

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 08:13, Alastair D'Silva a écrit : From: Alastair D'Silva Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat Documentation/accelerators/ocxl.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/accelerat

Re: [PATCH v5 6/7] ocxl: Add an IOCTL so userspace knows what OCXL features are available

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 08:13, Alastair D'Silva a écrit : From: Alastair D'Silva In order for a userspace AFU driver to call the POWER9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva --- Acked-by:

Re: [PATCH v5 5/7] ocxl: Expose the thread_id needed for wait on POWER9

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 08:13, Alastair D'Silva a écrit : From: Alastair D'Silva In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair

Re: [PATCH v5 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 08:13, Alastair D'Silva a écrit : From: Alastair D'Silva The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/pow

Re: [PATCH v5 3/7] powerpc: use task_pid_nr() for TID allocation

2018-05-11 Thread Frederic Barrat
va --- Thanks for adding the comment. It assumes the reader is aware that the TIDR value is only used for the notification using the 'wait' instruction, but that's likely to be the case. Reviewed-by: Frederic Barrat arch/powerpc/include/asm/switch_to.h | 1 - arch/po

Re: [PATCH v5 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 08:12, Alastair D'Silva a écrit : From: Alastair D'Silva Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva --- Reviewed-by: Frederic Barrat arch/powerpc/

Re: [PATCH v5 1/7] powerpc: Add TIDR CPU feature for POWER9

2018-05-11 Thread Frederic Barrat
Le 11/05/2018 à 08:12, Alastair D'Silva a écrit : From: Alastair D'Silva This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva --- Reviewed-by: Frederic Barrat

Re: [PATCH v2 7/7] ocxl: Document new OCXL IOCTLs

2018-05-07 Thread Frederic Barrat
Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : From: Alastair D'Silva Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat Fred Documentation/accelerators/ocxl.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/accelerat

Re: [PATCH v2 6/7] ocxl: Add an IOCTL so userspace knows what CPU features are available

2018-05-07 Thread Frederic Barrat
- Intended? Other than that, Acked-by: Frederic Barrat mmap diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c index eb409a469f21..33ae46ce0a8a 100644 --- a/drivers/misc/ocxl/file.c +++ b/drivers/misc/ocxl/file.c @@ -168,12 +168,32 @@ static long afu_ioctl_enable

Re: [PATCH v2 5/7] ocxl: Expose the thread_id needed for wait on p9

2018-05-07 Thread Frederic Barrat
Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : From: Alastair D'Silva In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair

Re: [PATCH v2 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-05-07 Thread Frederic Barrat
Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : From: Alastair D'Silva The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/pow

Re: [PATCH v2 3/7] powerpc: use task_pid_nr() for TID allocation

2018-05-07 Thread Frederic Barrat
ent with the above (at the minimum) :-) With a comment: Reviewed-by: Frederic Barrat Fred Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/switch_to.h | 1 - arch/powerpc/kernel/process.c| 97 +--- 2 files changed, 1 insertion(+),

Re: [PATCH v2 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-05-07 Thread Frederic Barrat
Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : From: Alastair D'Silva Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva --- Reviewed-by: Frederic Barrat arch/powerpc/

Re: [PATCH v2 1/7] powerpc: Add TIDR CPU feature for Power9

2018-05-07 Thread Frederic Barrat
Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : From: Alastair D'Silva This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/cputable.h | 3 ++- arch/

Re: [PATCH 2/2] misc: ocxl: use put_device() instead of device_unregister()

2018-03-13 Thread Frederic Barrat
: Frederic Barrat drivers/misc/ocxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c index 0051d9e..21f4254 100644 --- a/drivers/misc/ocxl/pci.c +++ b/drivers/misc/ocxl/pci.c @@ -519,7 +519,7 @@ static struct ocxl_fn

Re: [PATCH v3 2/2] ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL

2018-02-22 Thread Frederic Barrat
Le 22/02/2018 à 05:17, Alastair D'Silva a écrit : From: Alastair D'Silva Signed-off-by: Alastair D'Silva --- Acked-by: Frederic Barrat Documentation/accelerators/ocxl.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst

Re: [PATCH v3 1/2] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-22 Thread Frederic Barrat
effort in userspace. Signed-off-by: Alastair D'Silva --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/file.c | 27 +++ include/uapi/misc/ocxl.h | 17 + 2 files changed, 44 insertions(+) diff --git a/drivers/misc/ocxl/file.c b/drivers/m

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Frederic Barrat
Le 21/02/2018 à 07:43, Balbir Singh a écrit : On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva wrote: From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communic

Re: linux-4.16-rc1/drivers/misc/ocxl/file.c:320:broken error checking ?

2018-02-12 Thread Frederic Barrat
Le 12/02/2018 à 09:58, David Binderman a écrit : Hello there, linux-4.16-rc1/drivers/misc/ocxl/file.c:320]: (style) Checking if unsigned variable 'used' is less than zero. Source code is    used = append_xsl_error(ctx, &header, buf + sizeof(header));     if (used < 0)

Re: [PATCH] ocxl: fix signed comparison with less than zero

2018-01-31 Thread Frederic Barrat
ero: used < 0 Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") Signed-off-by: Colin Ian King --- Thanks! Acked-by: Frederic Barrat drivers/misc/ocxl/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/

Re: [PATCH v2 12/13] ocxl: Documentation

2018-01-26 Thread Frederic Barrat
Le 25/01/2018 à 14:17, Greg KH a écrit : On Tue, Jan 23, 2018 at 12:31:47PM +0100, Frederic Barrat wrote: ocxl.rst gives a quick, high-level view of opencapi. Update ioctl-number.txt to reflect ioctl numbers being used by the ocxl driver Signed-off-by: Frederic Barrat --- Documentation

[PATCH v2 03/13] powerpc/powernv: Add opal calls for opencapi

2018-01-23 Thread Frederic Barrat
host and device must negotiate what templates are supported on both sides and at what rates those messages can be sent. Signed-off-by: Frederic Barrat Acked-by: Andrew Donnellan --- arch/powerpc/include/asm/opal-api.h| 5 - arch/powerpc/include/asm/opal.h| 6

[PATCH v2 02/13] powerpc/powernv: Set correct configuration space size for opencapi devices

2018-01-23 Thread Frederic Barrat
e. Signed-off-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- arch/powerpc/platforms/powernv/pci-ioda.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index e780263a14ee..d5af70082

[PATCH v2 05/13] powerpc/powernv: Capture actag information for the device

2018-01-23 Thread Frederic Barrat
tion being quite general. The number of available actags on POWER9 makes it more likely to be hit. This is somewhat mitigated by the fact that existing AFUs are coded by requesting a reasonable count of actags and existing devices carry only one AFU. Signed-off-by: Frederic Barrat --- arch/powerpc/i

[PATCH v2 10/13] ocxl: Add Makefile and Kconfig

2018-01-23 Thread Frederic Barrat
OCXL_BASE triggers the platform support needed by the driver. Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan --- drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/ocxl/Kconfig | 31 +++ drivers/misc/ocxl/Makefile

[PATCH v2 04/13] powerpc/powernv: Add platform-specific services for opencapi

2018-01-23 Thread Frederic Barrat
by the NPU - map/unmap some NPU mmio registers to get the fault context when the NPU raises an address translation fault The rest are wrappers around the previously-introduced opal calls. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 29 + arch/powerpc

[PATCH v2 06/13] ocxl: Driver code for 'generic' opencapi devices

2018-01-23 Thread Frederic Barrat
hed to the opencapi device. Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 712 ++ drivers/misc/ocxl/context.c | 230 drivers/misc/ocxl/file.c

[PATCH v2 07/13] ocxl: Add AFU interrupt support

2018-01-23 Thread Frederic Barrat
and a write to that page will trigger an interrupt. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 3 + arch/powerpc/platforms/powernv/ocxl.c | 30 ++ drivers/misc/ocxl/afu_irq.c | 197 ++ drivers/misc/ocxl/context.c

[PATCH v2 12/13] ocxl: Documentation

2018-01-23 Thread Frederic Barrat
ocxl.rst gives a quick, high-level view of opencapi. Update ioctl-number.txt to reflect ioctl numbers being used by the ocxl driver Signed-off-by: Frederic Barrat --- Documentation/ABI/testing/sysfs-class-ocxl | 35 +++ Documentation/accelerators/ocxl.rst| 160

[PATCH v2 09/13] ocxl: Add trace points

2018-01-23 Thread Frederic Barrat
Define a few trace points so that we can use the standard tracing mechanism for debug and/or monitoring. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/afu_irq.c | 5 ++ drivers/misc/ocxl/context.c | 2 + drivers/misc/ocxl/link.c| 11 ++- drivers/misc/ocxl/trace.c | 6

[PATCH v2 13/13] ocxl: add MAINTAINERS entry

2018-01-23 Thread Frederic Barrat
Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a6e86e20761e..8a0357f3b7bc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9820,6 +9820,18 @@ M: Josh Poimboeuf

[PATCH v2 08/13] ocxl: Add a kernel API for other opencapi drivers

2018-01-23 Thread Frederic Barrat
calling a in-kernel library. It is still a bit theoretical, for lack of real hardware, and will likely need adjustements down the road. But we used the cxlflash driver as a guinea pig. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/config.c| 13 ++- drivers/misc/ocxl/link.c

[PATCH v2 11/13] cxl: Remove support for "Processing accelerators" class

2018-01-23 Thread Frederic Barrat
unnoticed. Signed-off-by: Frederic Barrat Acked-by: Andrew Donnellan --- drivers/misc/cxl/pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 19969ee86d6f..758842f65a1b 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c

[PATCH v2 00/13] New driver to support OpenCAPI devices on POWER9

2018-01-23 Thread Frederic Barrat
12: add documentation for new sysfs files patch 13: follow alphabetical order for new entry in MAINTAINERS Andrew Donnellan (1): powerpc/powernv: Set correct configuration space size for opencapi devices Frederic Barrat (12): powerpc/powernv: Introduce new PHB type for opencapi links p

[PATCH v2 01/13] powerpc/powernv: Introduce new PHB type for opencapi links

2018-01-23 Thread Frederic Barrat
e existing PNV_PHB_NPU type to PNV_PHB_NPU_NVLINK and add a new type PNV_PHB_NPU_OCAPI. Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan --- arch/powerpc/platforms/powernv/npu-dma.c | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 41 +-- ar

Re: [PATCH 1/2] powerpc: export thread-tidr interfaces

2018-01-16 Thread Frederic Barrat
Hi, diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 2010e4c..f20c1ad 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1560,6 +1560,7 @@ void clear_thread_tidr(struct task_struct *t) free_thread_tidr(t->thread.tidr);

Re: [PATCH 10/13] ocxl: Add Makefile and Kconfig

2018-01-10 Thread Frederic Barrat
Le 10/01/2018 à 00:21, Michael Ellerman a écrit : Would also be great to add something describing the relationship to CAPI and cxl. Otherwise people will be confused about whether they need this one or the other one or both. OK, I'll add something. Fred

Re: [PATCH 10/13] ocxl: Add Makefile and Kconfig

2018-01-09 Thread Frederic Barrat
Le 03/01/2018 à 06:48, Andrew Donnellan a écrit : On 19/12/17 02:21, Frederic Barrat wrote: OCXL_BASE triggers the platform support needed by the driver. Signed-off-by: Frederic Barrat ---   drivers/misc/Kconfig   |  1 +   drivers/misc/Makefile  |  1 +   drivers/misc/ocxl/Kconfig

Re: [PATCH 09/13] ocxl: Add trace points

2017-12-20 Thread Frederic Barrat
Le 18/12/2017 à 17:48, Philippe Ombredanne a écrit : --- /dev/null +++ b/drivers/misc/ocxl/trace.h @@ -0,0 +1,189 @@ +/* + * Copyright 2017 IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as publ

Re: [PATCH 13/13] ocxl: add MAINTAINERS entry

2017-12-19 Thread Frederic Barrat
Le 18/12/2017 à 17:04, Joe Perches a écrit : +OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER +M: Frederic Barrat +M: Andrew Donnellan +L: linuxppc-...@lists.ozlabs.org +S: Supported +F: arch/powerpc/platforms/powernv/ocxl.c +F: arch/powerpc/include

[PATCH 02/13] powerpc/powernv: Set correct configuration space size for opencapi devices

2017-12-18 Thread Frederic Barrat
ize. Signed-off-by: Andrew Donnellan Signed-off-by: Frederic Barrat --- arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index c37b5d288f9c..b8ec76aa266f

[PATCH 01/13] powerpc/powernv: Introduce new PHB type for opencapi links

2017-12-18 Thread Frederic Barrat
e existing PNV_PHB_NPU type to PNV_PHB_NPU_NVLINK and add a new type PNV_PHB_NPU_OCAPI. Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan --- arch/powerpc/platforms/powernv/npu-dma.c | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 46 +++ ar

[PATCH 05/13] powerpc/powernv: Capture actag information for the device

2017-12-18 Thread Frederic Barrat
tion being quite general. The number of available actags on POWER9 makes it more likely to be hit. This is somewhat mitigated by the fact that existing AFUs are coded by requesting a reasonable count of actags and existing devices carry only one AFU. Signed-off-by: Frederic Barrat --- arch/powerpc/i

[PATCH 08/13] ocxl: Add a kernel API for other opencapi drivers

2017-12-18 Thread Frederic Barrat
calling a in-kernel library. It is still a bit theoretical, for lack of real hardware, and will likely need adjustements down the road. But we used the cxlflash driver as a guinea pig. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/config.c| 13 ++- drivers/misc/ocxl/link.c

[PATCH 07/13] ocxl: Add AFU interrupt support

2017-12-18 Thread Frederic Barrat
and a write to that page will trigger an interrupt. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 3 + arch/powerpc/platforms/powernv/ocxl.c | 30 + drivers/misc/ocxl/afu_irq.c | 204 ++ drivers/misc/ocxl/context.c

[PATCH 06/13] ocxl: Driver code for 'generic' opencapi devices

2017-12-18 Thread Frederic Barrat
hed to the opencapi device. Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/config.c| 718 ++ drivers/misc/ocxl/context.c | 237 + drivers/misc/ocxl/file.c

[PATCH 10/13] ocxl: Add Makefile and Kconfig

2017-12-18 Thread Frederic Barrat
OCXL_BASE triggers the platform support needed by the driver. Signed-off-by: Frederic Barrat --- drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/ocxl/Kconfig | 25 + drivers/misc/ocxl/Makefile | 10 ++ 4 files changed, 37

[PATCH 12/13] ocxl: Documentation

2017-12-18 Thread Frederic Barrat
ocxl.rst gives a quick, high-level view of opencapi. Update ioctl-number.txt to reflect ioctl numbers being used by the ocxl driver Signed-off-by: Frederic Barrat --- Documentation/accelerators/ocxl.rst | 151 +++ Documentation/ioctl/ioctl-number.txt | 1 + 2

[PATCH 09/13] ocxl: Add trace points

2017-12-18 Thread Frederic Barrat
Define a few trace points so that we can use the standard tracing mechanism for debug and/or monitoring. Signed-off-by: Frederic Barrat --- drivers/misc/ocxl/afu_irq.c | 5 ++ drivers/misc/ocxl/context.c | 2 + drivers/misc/ocxl/link.c| 11 ++- drivers/misc/ocxl/trace.c | 13

[PATCH 13/13] ocxl: add MAINTAINERS entry

2017-12-18 Thread Frederic Barrat
Signed-off-by: Frederic Barrat Signed-off-by: Andrew Donnellan --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a6e86e20761e..edc9e1db352b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3919,6 +3919,18 @@ F: drivers/scsi

[PATCH 11/13] cxl: Remove support for "Processing accelerators" class

2017-12-18 Thread Frederic Barrat
unnoticed. Signed-off-by: Frederic Barrat --- drivers/misc/cxl/pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 19969ee86d6f..758842f65a1b 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -125,8 +125,6 @@ static co

[PATCH 03/13] powerpc/powernv: Add opal calls for opencapi

2017-12-18 Thread Frederic Barrat
host and device must negotiate what templates are supported on both sides and at what rates those messages can be sent. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/opal-api.h| 5 - arch/powerpc/include/asm/opal.h| 6 ++ arch/powerpc/platforms

[PATCH 00/13] New driver to support OpenCAPI devices on POWER9

2017-12-18 Thread Frederic Barrat
he adapter-local memory Many people contributed directly or indirectly, from the software, hardware and bringup teams. In particular Andrew Donnellan and Alastair D'Silva, who are developing the related firmware and library. Feedback welcome! Frederic Barrat (13): powerpc/powernv: Introdu

[PATCH 04/13] powerpc/powernv: Add platform-specific services for opencapi

2017-12-18 Thread Frederic Barrat
by the NPU - map/unmap some NPU mmio registers to get the fault context when the NPU raises an address translation fault The rest are wrappers around the previously-introduced opal calls. Signed-off-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 36 ++ arch/powerpc

Re: [PATCH] cxl: drop unused header asm/pnv-pci.h

2017-01-21 Thread Frederic Barrat
Le 19/01/2017 à 04:50, Greg Kurz a écrit : The kernel API does not use anything from this header file. Signed-off-by: Greg Kurz --- Acked-by: Frederic Barrat

Re: [PATCH] cxl: Fix error handling

2016-11-02 Thread Frederic Barrat
Le 30/10/2016 à 22:40, Christophe JAILLET a écrit : 'cxl_dev_context_init()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET --- Thanks for the 3 patches! Acked-by: Frederic Barrat

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

2016-11-02 Thread Frederic Barrat
hile fixing it, simplify a bit the code. Signed-off-by: Christophe JAILLET --- Acked-by: Frederic Barrat

Re: [PATCH] cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put()

2016-08-01 Thread Frederic Barrat
Le 29/07/2016 à 13:38, Michael Ellerman a écrit : But who does keep a reference on the device_node? I can't see it anywhere. Which means in theory the device_node can be freed out from under you. You have a reference for afu_np as part of for_each_child_of_node(), but it's dropped as soon as you

Re: [PATCH] cxl: replace loop with for_each_child_of_node(), remove unneeded of_node_put()

2016-07-29 Thread Frederic Barrat
y: SF Markus Elfring Reported-by: Julia Lawall Signed-off-by: Andrew Donnellan Thanks! Reviewed-by: Frederic Barrat

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

2016-03-09 Thread Frederic Barrat
Hi Vaibhav, Le 09/03/2016 15:37, Vaibhav Jain a écrit : I would propose these two apis. /* * fetches an event from the driver event queue. NULL means that queue * is empty. Can sleep if needed. The memory for cxl_event is allocated * by module being called. Hence it can be potentially be la

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

2016-03-09 Thread Frederic Barrat
Hi Ian, Le 08/03/2016 02:48, Ian Munsie a écrit : diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c ... +static inline bool ctx_event_pending(struct cxl_context *ctx) +{ + if (ctx->pending_irq || ctx->pending_fault || ctx->pending_afu_err) + return true; + +