diff options
author | Christophe Lombard <clombard@linux.vnet.ibm.com> | 2020-11-25 18:50:11 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-12-03 17:01:30 +0300 |
commit | d731feea00c7c1734c9697558f2a1962c12d2710 (patch) | |
tree | 06b53cfd7eef05dbf3f7e4996244a7006443b69e /drivers/misc/ocxl/context.c | |
parent | 19b311ca51e108b6d8d679496af8635fdc1984a8 (diff) | |
download | linux-d731feea00c7c1734c9697558f2a1962c12d2710.tar.xz |
ocxl: Update the Process Element Entry
To complete the MMIO based mechanism, the fields: PASID, bus, device and
function of the Process Element Entry have to be filled. (See
OpenCAPI Power Platform Architecture document)
Hypervisor Process Element Entry
Word
0 1 .... 7 8 ...... 12 13 ..15 16.... 19 20 ........... 31
0 OSL Configuration State (0:31)
1 OSL Configuration State (32:63)
2 PASID | Reserved
3 Bus | Device |Function | Reserved
4 Reserved
5 Reserved
6 ....
Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201125155013.39955-4-clombard@linux.vnet.ibm.com
Diffstat (limited to 'drivers/misc/ocxl/context.c')
-rw-r--r-- | drivers/misc/ocxl/context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c index c21f65a5c762..9eb0d93b01c6 100644 --- a/drivers/misc/ocxl/context.c +++ b/drivers/misc/ocxl/context.c @@ -70,6 +70,7 @@ int ocxl_context_attach(struct ocxl_context *ctx, u64 amr, struct mm_struct *mm) { int rc; unsigned long pidr = 0; + struct pci_dev *dev; // Locks both status & tidr mutex_lock(&ctx->status_mutex); @@ -81,8 +82,9 @@ int ocxl_context_attach(struct ocxl_context *ctx, u64 amr, struct mm_struct *mm) if (mm) pidr = mm->context.id; + dev = to_pci_dev(ctx->afu->fn->dev.parent); rc = ocxl_link_add_pe(ctx->afu->fn->link, ctx->pasid, pidr, ctx->tidr, - amr, mm, xsl_fault_error, ctx); + amr, pci_dev_id(dev), mm, xsl_fault_error, ctx); if (rc) goto out; |