diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2017-11-08 05:23:57 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-12 01:03:10 +0300 |
commit | 61f3cca8cda979646c24accd9dbf3e2de7ea6ceb (patch) | |
tree | aa66625a3155327928bce31a68561945badafbba /arch/powerpc/platforms/powernv/vas-window.c | |
parent | 5676be2fb7035ac32da3a96241611e7eddff6157 (diff) | |
download | linux-61f3cca8cda979646c24accd9dbf3e2de7ea6ceb.tar.xz |
powerpc/vas: Define vas_win_id()
Define an interface to return a system-wide unique id for a given VAS
window.
The vas_win_id() will be used in a follow-on patch to generate an unique
handle for a user space receive window. Applications can use this handle
to pair send and receive windows for fast thread-wakeup.
The hardware refers to this system-wide unique id as a Partition Send
Window ID which is expected to be used during fault handling. Hence the
"pswid" in the function names.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/vas-window.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/vas-window.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c index d7d06533a1e9..82754924c2bc 100644 --- a/arch/powerpc/platforms/powernv/vas-window.c +++ b/arch/powerpc/platforms/powernv/vas-window.c @@ -1235,3 +1235,12 @@ int vas_win_close(struct vas_window *window) return 0; } EXPORT_SYMBOL_GPL(vas_win_close); + +/* + * Return a system-wide unique window id for the window @win. + */ +u32 vas_win_id(struct vas_window *win) +{ + return encode_pswid(win->vinst->vas_id, win->winid); +} +EXPORT_SYMBOL_GPL(vas_win_id); |