Linux 5.1.15
[linux/fpc-iii.git] / drivers / misc / mic / scif / scif_rma_list.h
blob7d58d1d551b0ebe29fb05f0def66b3c054ae6635
1 /*
2 * Intel MIC Platform Software Stack (MPSS)
4 * Copyright(c) 2015 Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, version 2, as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * Intel SCIF driver.
18 #ifndef SCIF_RMA_LIST_H
19 #define SCIF_RMA_LIST_H
22 * struct scif_rma_req - Self Registration list RMA Request query
24 * @out_window - Returns the window if found
25 * @offset: Starting offset
26 * @nr_bytes: number of bytes
27 * @prot: protection requested i.e. read or write or both
28 * @type: Specify single, partial or multiple windows
29 * @head: Head of list on which to search
30 * @va_for_temp: VA for searching temporary cached windows
32 struct scif_rma_req {
33 struct scif_window **out_window;
34 union {
35 s64 offset;
36 unsigned long va_for_temp;
38 size_t nr_bytes;
39 int prot;
40 enum scif_window_type type;
41 struct list_head *head;
44 /* Insert */
45 void scif_insert_window(struct scif_window *window, struct list_head *head);
46 void scif_insert_tcw(struct scif_window *window,
47 struct list_head *head);
48 /* Query */
49 int scif_query_window(struct scif_rma_req *request);
50 int scif_query_tcw(struct scif_endpt *ep, struct scif_rma_req *request);
51 /* Called from close to unregister all self windows */
52 int scif_unregister_all_windows(scif_epd_t epd);
53 void scif_unmap_all_windows(scif_epd_t epd);
54 /* Traverse list and unregister */
55 int scif_rma_list_unregister(struct scif_window *window, s64 offset,
56 int nr_pages);
57 #endif /* SCIF_RMA_LIST_H */