[PATCH v6 15/17] powerpc/vas: Define window open ioctls API

From: Sukadev Bhattiprolu
Date: Tue Aug 08 2017 - 19:08:47 EST


Define the VAS_TX_WIN_OPEN and VAS_RX_WIN_OPEN ioctl interface. Each user
of VAS, like the NX-FTW driver in a follow-on patch, should implement
these ioctls.

Signed-off-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
---
arch/powerpc/include/uapi/asm/vas.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/arch/powerpc/include/uapi/asm/vas.h b/arch/powerpc/include/uapi/asm/vas.h
index 21249f5..e9730fb 100644
--- a/arch/powerpc/include/uapi/asm/vas.h
+++ b/arch/powerpc/include/uapi/asm/vas.h
@@ -10,6 +10,8 @@
#ifndef _UAPI_MISC_VAS_H
#define _UAPI_MISC_VAS_H

+#include <asm/ioctl.h>
+
/*
* Threshold Control Mode: Have paste operation fail if the number of
* requests in receive FIFO exceeds a threshold.
@@ -22,6 +24,34 @@
#define VAS_THRESH_FIFO_GT_QTR_FULL 2
#define VAS_THRESH_FIFO_GT_EIGHTH_FULL 3

+#define VAS_FLAGS_PIN_WINDOW 0x1
+#define VAS_FLAGS_HIGH_PRI 0x2
+
+#define VAS_TX_WIN_OPEN _IOW('v', 1, struct vas_tx_win_open_attr)
+#define VAS_RX_WIN_OPEN _IOW('v', 2, struct vas_rx_win_open_attr)
+
+struct vas_tx_win_open_attr {
+ int16_t version;
+ int16_t vas_id;
+ uint32_t rx_win_handle;
+
+ int64_t reserved1;
+
+ int64_t flags;
+ int64_t reserved2;
+
+ int32_t tc_mode;
+ int32_t rsvd_txbuf;
+ int64_t reserved3[6];
+};
+
+struct vas_rx_win_open_attr {
+ int16_t version;
+ int16_t vas_id;
+ uint32_t rx_win_handle; /* output field */
+ int64_t reserved[8];
+};
+
/*
* Get/Set bit fields
*/
--
2.7.4