summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv/vas.h
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.ibm.com>2020-04-17 12:02:01 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-04-20 09:53:14 +0300
commitdda44eb29c235735a5ceae283dc521cfca27885c (patch)
tree89470b22fe9ed17e01a43bd40898760d7b6cbf9e /arch/powerpc/platforms/powernv/vas.h
parent45f25a79fe50f330b563d012fc856a1103cb00d8 (diff)
downloadlinux-dda44eb29c235735a5ceae283dc521cfca27885c.tar.xz
powerpc/vas: Add VAS user space API
On power9, userspace can send GZIP compression requests directly to NX once kernel establishes NX channel / window with VAS. This patch provides user space API which allows user space to establish channel using open VAS_TX_WIN_OPEN ioctl, mmap and close operations. Each window corresponds to file descriptor and application can open multiple windows. After the window is opened, VAS_TX_WIN_OPEN icoctl to open a window on specific VAS instance, mmap() system call to map the hardware address of engine's request queue into the application's virtual address space. Then the application can then submit one or more requests to the the engine by using the copy/paste instructions and pasting the CRBs to the virtual address (aka paste_address) returned by mmap(). Only NX GZIP coprocessor type is supported right now and allow GZIP engine access via /dev/crypto/nx-gzip device node. Thanks to Michael Ellerman for his changes and suggestions to make the ioctl generic to support any coprocessor type. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Haren Myneni <haren@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1587114121.2275.1109.camel@hbabu-laptop
Diffstat (limited to 'arch/powerpc/platforms/powernv/vas.h')
-rw-r--r--arch/powerpc/platforms/powernv/vas.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/vas.h b/arch/powerpc/platforms/powernv/vas.h
index a7143b16232f..70f793e8f6cc 100644
--- a/arch/powerpc/platforms/powernv/vas.h
+++ b/arch/powerpc/platforms/powernv/vas.h
@@ -437,6 +437,8 @@ extern irqreturn_t vas_fault_handler(int irq, void *dev_id);
extern void vas_return_credit(struct vas_window *window, bool tx);
extern struct vas_window *vas_pswid_to_window(struct vas_instance *vinst,
uint32_t pswid);
+extern void vas_win_paste_addr(struct vas_window *window, u64 *addr,
+ int *len);
static inline int vas_window_pid(struct vas_window *window)
{