diff options
author | Haren Myneni <haren@linux.ibm.com> | 2021-06-17 23:31:06 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-06-20 14:58:55 +0300 |
commit | 1a0d0d5ed5e3cd9e3fc1ad4459f1db2f3618fce0 (patch) | |
tree | 5566fdcf67f14697769574fe07646191342a5f08 /arch/powerpc/include/asm/vas.h | |
parent | 06c6fad9bfe0b6439e18ea1f1cf0d178405ccf25 (diff) | |
download | linux-1a0d0d5ed5e3cd9e3fc1ad4459f1db2f3618fce0.tar.xz |
powerpc/vas: Add platform specific user window operations
PowerNV uses registers to open/close VAS windows, and getting the
paste address. Whereas the hypervisor calls are used on PowerVM.
This patch adds the platform specific user space window operations
and register with the common VAS user space interface.
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/f85091f4ace67f951ac04d60394d67b21e2f5d3c.camel@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/vas.h')
-rw-r--r-- | arch/powerpc/include/asm/vas.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/vas.h index 6076adf9ab4f..163a8bb85d02 100644 --- a/arch/powerpc/include/asm/vas.h +++ b/arch/powerpc/include/asm/vas.h @@ -5,6 +5,7 @@ #ifndef _ASM_POWERPC_VAS_H #define _ASM_POWERPC_VAS_H +#include <uapi/asm/vas-api.h> struct vas_window; @@ -49,6 +50,16 @@ enum vas_cop_type { }; /* + * User space window operations used for powernv and powerVM + */ +struct vas_user_win_ops { + struct vas_window * (*open_win)(int vas_id, u64 flags, + enum vas_cop_type); + u64 (*paste_addr)(struct vas_window *); + int (*close_win)(struct vas_window *); +}; + +/* * Receive window attributes specified by the (in-kernel) owner of window. */ struct vas_rx_win_attr { @@ -162,8 +173,6 @@ int vas_copy_crb(void *crb, int offset); */ int vas_paste_crb(struct vas_window *win, int offset, bool re); -void vas_win_paste_addr(struct vas_window *window, u64 *addr, - int *len); int vas_register_api_powernv(struct module *mod, enum vas_cop_type cop_type, const char *name); void vas_unregister_api_powernv(void); @@ -177,7 +186,8 @@ void vas_unregister_api_powernv(void); * used for others in future. */ int vas_register_coproc_api(struct module *mod, enum vas_cop_type cop_type, - const char *name); + const char *name, + const struct vas_user_win_ops *vops); void vas_unregister_coproc_api(void); #endif /* __ASM_POWERPC_VAS_H */ |