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.
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
33 struct scif_window **out_window;
36 unsigned long va_for_temp;
40 enum scif_window_type type;
41 struct list_head *head;
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);
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,
57 #endif /* SCIF_RMA_LIST_H */