• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Intel MIC Platform Software Stack (MPSS)
3  *
4  * Copyright(c) 2015 Intel Corporation.
5  *
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.
9  *
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.
14  *
15  * Intel SCIF driver.
16  *
17  */
18 #ifndef SCIF_RMA_LIST_H
19 #define SCIF_RMA_LIST_H
20 
21 /*
22  * struct scif_rma_req - Self Registration list RMA Request query
23  *
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
31  */
32 struct scif_rma_req {
33 	struct scif_window **out_window;
34 	union {
35 		s64 offset;
36 		unsigned long va_for_temp;
37 	};
38 	size_t nr_bytes;
39 	int prot;
40 	enum scif_window_type type;
41 	struct list_head *head;
42 };
43 
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 */
58