aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorAnnie Li <annie.li@oracle.com>2011-12-12 05:13:57 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-12-16 11:23:05 -0500
commit9dbc71d53ce4e0260d0a8307838cd9ebddc07a12 (patch)
tree4020fb401672ea02d366dcd42f02078039ab8b22 /drivers/xen
parent4313d88c93df8c096adde516b08f1fb2f2e8b844 (diff)
xen/granttable: Improve comments for function pointers
Signed-off-by: Annie Li <annie.li@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/grant-table.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index bd325fd0000b..1589ea1a2445 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -76,50 +76,50 @@ static union {
76/*This is a structure of function pointers for grant table*/ 76/*This is a structure of function pointers for grant table*/
77struct gnttab_ops { 77struct gnttab_ops {
78 /* 78 /*
79 * Mapping a list of frames for storing grant entries. First input 79 * Mapping a list of frames for storing grant entries. Frames parameter
80 * parameter is used to storing grant table address when grant table 80 * is used to store grant table address when grant table being setup,
81 * being setup, second parameter is the number of frames to map grant 81 * nr_gframes is the number of frames to map grant table. Returning
82 * table. Returning GNTST_okay means success and negative value means 82 * GNTST_okay means success and negative value means failure.
83 * failure.
84 */ 83 */
85 int (*map_frames)(unsigned long *, unsigned int); 84 int (*map_frames)(unsigned long *frames, unsigned int nr_gframes);
86 /* 85 /*
87 * Release a list of frames which are mapped in map_frames for grant 86 * Release a list of frames which are mapped in map_frames for grant
88 * entry status. 87 * entry status.
89 */ 88 */
90 void (*unmap_frames)(void); 89 void (*unmap_frames)(void);
91 /* 90 /*
92 * Introducing a valid entry into the grant table, granting the frame 91 * Introducing a valid entry into the grant table, granting the frame of
93 * of this grant entry to domain for accessing, or transfering, or 92 * this grant entry to domain for accessing or transfering. Ref
94 * transitively accessing. First input parameter is reference of this 93 * parameter is reference of this introduced grant entry, domid is id of
95 * introduced grant entry, second one is domid of granted domain, third 94 * granted domain, frame is the page frame to be granted, and flags is
96 * one is the frame to be granted, and the last one is status of the 95 * status of the grant entry to be updated.
97 * grant entry to be updated.
98 */ 96 */
99 void (*update_entry)(grant_ref_t, domid_t, unsigned long, unsigned); 97 void (*update_entry)(grant_ref_t ref, domid_t domid,
98 unsigned long frame, unsigned flags);
100 /* 99 /*
101 * Stop granting a grant entry to domain for accessing. First input 100 * Stop granting a grant entry to domain for accessing. Ref parameter is
102 * parameter is reference of a grant entry whose grant access will be 101 * reference of a grant entry whose grant access will be stopped,
103 * stopped, second one is not in use now. If the grant entry is 102 * readonly is not in use in this function. If the grant entry is
104 * currently mapped for reading or writing, just return failure(==0) 103 * currently mapped for reading or writing, just return failure(==0)
105 * directly and don't tear down the grant access. Otherwise, stop grant 104 * directly and don't tear down the grant access. Otherwise, stop grant
106 * access for this entry and return success(==1). 105 * access for this entry and return success(==1).
107 */ 106 */
108 int (*end_foreign_access_ref)(grant_ref_t, int); 107 int (*end_foreign_access_ref)(grant_ref_t ref, int readonly);
109 /* 108 /*
110 * Stop granting a grant entry to domain for transfer. If tranfer has 109 * Stop granting a grant entry to domain for transfer. Ref parameter is
111 * not started, just reclaim the grant entry and return failure(==0). 110 * reference of a grant entry whose grant transfer will be stopped. If
112 * Otherwise, wait for the transfer to complete and then return the 111 * tranfer has not started, just reclaim the grant entry and return
113 * frame. 112 * failure(==0). Otherwise, wait for the transfer to complete and then
113 * return the frame.
114 */ 114 */
115 unsigned long (*end_foreign_transfer_ref)(grant_ref_t); 115 unsigned long (*end_foreign_transfer_ref)(grant_ref_t ref);
116 /* 116 /*
117 * Query the status of a grant entry. Input parameter is reference of 117 * Query the status of a grant entry. Ref parameter is reference of
118 * queried grant entry, return value is the status of queried entry. 118 * queried grant entry, return value is the status of queried entry.
119 * Detailed status(writing/reading) can be gotten from the return value 119 * Detailed status(writing/reading) can be gotten from the return value
120 * by bit operations. 120 * by bit operations.
121 */ 121 */
122 int (*query_foreign_access)(grant_ref_t); 122 int (*query_foreign_access)(grant_ref_t ref);
123}; 123};
124 124
125static struct gnttab_ops *gnttab_interface; 125static struct gnttab_ops *gnttab_interface;