aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/file.c
diff options
context:
space:
mode:
authorChristophe Lombard <clombard@linux.vnet.ibm.com>2016-03-04 06:26:36 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2016-03-09 07:36:52 -0500
commit14baf4d9c739e6e69150512d2eb23c71fffcc192 (patch)
tree0ed05f5ee469c2933b49bbd53b6777b67f975fa2 /drivers/misc/cxl/file.c
parentcbffa3a5146a90f46806cef3a98b8be5833727e8 (diff)
cxl: Add guest-specific code
The new of.c file contains code to parse the device tree to find out about cxl adapters and AFUs. guest.c implements the guest-specific callbacks for the backend API. The process element ID is not known until the context is attached, so we have to separate the context 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 <fbarrat@linux.vnet.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com> Acked-by: Ian Munsie <imunsie@au1.ibm.com> [mpe: Fix SMP=n build, fix PSERIES=n build, minor whitespace fixes] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/file.c')
-rw-r--r--drivers/misc/cxl/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c
index b8ce29bc52d5..df4d49a6c67a 100644
--- a/drivers/misc/cxl/file.c
+++ b/drivers/misc/cxl/file.c
@@ -228,7 +228,7 @@ static long afu_ioctl_process_element(struct cxl_context *ctx,
228{ 228{
229 pr_devel("%s: pe: %i\n", __func__, ctx->pe); 229 pr_devel("%s: pe: %i\n", __func__, ctx->pe);
230 230
231 if (copy_to_user(upe, &ctx->pe, sizeof(__u32))) 231 if (copy_to_user(upe, &ctx->external_pe, sizeof(__u32)))
232 return -EFAULT; 232 return -EFAULT;
233 233
234 return 0; 234 return 0;