xen/grant-table: Add an helper to iterate over a specific number of grants
[firefly-linux-kernel-4.4.55.git] / include / xen / grant_table.h
index e17a4b381a16c083b5b6a563b3d4eb732dcc731e..34b1379f9777d4e7969f3288a51305c0c8738c9d 100644 (file)
@@ -264,6 +264,12 @@ static inline void gnttab_for_one_grant(struct page *page, unsigned int offset,
        gnttab_foreach_grant_in_range(page, offset, len, fn, data);
 }
 
+/* Get @nr_grefs grants from an array of page and call fn for each grant */
+void gnttab_foreach_grant(struct page **pages,
+                         unsigned int nr_grefs,
+                         xen_grant_fn_t fn,
+                         void *data);
+
 /* Get the number of grant in a specified region
  *
  * start: Offset from the beginning of the first page