diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2017-08-28 23:23:37 -0700 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-31 14:26:36 +1000 |
commit | 62c4eda4fabe89709ec43dcf1efe9fbea007a734 (patch) | |
tree | 86cdbe02542a8069bc8f49190367caf46c8a586f /arch/powerpc/platforms/powernv/vas.h | |
parent | bbfe59f8a7057f80f67a74e77fb4e941240e90b9 (diff) |
powerpc/powernv/vas: Define vas_rx_win_open() interface
Define the vas_rx_win_open() interface. This interface is intended to
be used by the Nest Accelerator (NX) driver(s) to setup receive
windows for one or more NX engines (which implement compression &
encryption algorithms in the hardware).
Follow-on patches will provide an interface to close the window and to
open a send window that kernel subsystems can use to access the NX
engines.
The interface to open a receive window is expected to be invoked for
each instance of VAS in the system.
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.h')
-rw-r--r-- | arch/powerpc/platforms/powernv/vas.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/vas.h b/arch/powerpc/platforms/powernv/vas.h index 60a3c3c1615b..d3e4f554a11c 100644 --- a/arch/powerpc/platforms/powernv/vas.h +++ b/arch/powerpc/platforms/powernv/vas.h @@ -289,6 +289,9 @@ enum vas_notify_after_count { /* * One per instance of VAS. Each instance will have a separate set of * receive windows, one per coprocessor type. + * + * See also function header of set_vinst_win() for details on ->windows[] + * and ->rxwin[] tables. */ struct vas_instance { int vas_id; @@ -393,6 +396,16 @@ extern struct vas_instance *find_vas_instance(int vasid); #define VREG(r) VREG_SFX(r, _OFFSET) #ifdef vas_debug +static inline void dump_rx_win_attr(struct vas_rx_win_attr *attr) +{ + pr_err("VAS: fault %d, notify %d, intr %d early %d\n", + attr->fault_win, attr->notify_disable, + attr->intr_disable, attr->notify_early); + + pr_err("VAS: rx_fifo_size %d, max value %d\n", + attr->rx_fifo_size, VAS_RX_FIFO_SIZE_MAX); +} + static inline void vas_log_write(struct vas_window *win, char *name, void *regptr, u64 val) { @@ -405,6 +418,7 @@ static inline void vas_log_write(struct vas_window *win, char *name, #else /* vas_debug */ #define vas_log_write(win, name, reg, val) +#define dump_rx_win_attr(attr) #endif /* vas_debug */ |