[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MINI-OS PATCH 16/19] gnttab: remove gnttab_alloc_and_grant() function



The last user of gnttab_alloc_and_grant() is gone.

Remove gnttab_alloc_and_grant() as it is doing more harm than good.
It is hard coded to only grant access for dom0, which is not really
clear from looking at the function name. It would be possible to add
a domid parameter, but given its now 0 users, there doesn't seem to be
a real demand for that function.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 gnttab.c         | 13 -------------
 include/gnttab.h |  1 -
 2 files changed, 14 deletions(-)

diff --git a/gnttab.c b/gnttab.c
index 5b04ab01..6bac0905 100644
--- a/gnttab.c
+++ b/gnttab.c
@@ -149,19 +149,6 @@ gnttab_end_transfer(grant_ref_t ref)
 }
 EXPORT_SYMBOL(gnttab_end_transfer);
 
-grant_ref_t
-gnttab_alloc_and_grant(void **map)
-{
-    unsigned long mfn;
-    grant_ref_t gref;
-
-    *map = (void *)alloc_page();
-    mfn = virt_to_mfn(*map);
-    gref = gnttab_grant_access(0, mfn, 0);
-    return gref;
-}
-EXPORT_SYMBOL(gnttab_alloc_and_grant);
-
 static const char * const gnttabop_error_msgs[] = GNTTABOP_error_msgs;
 
 const char *
diff --git a/include/gnttab.h b/include/gnttab.h
index 974cb89d..108c4425 100644
--- a/include/gnttab.h
+++ b/include/gnttab.h
@@ -4,7 +4,6 @@
 #include <xen/grant_table.h>
 
 void init_gnttab(void);
-grant_ref_t gnttab_alloc_and_grant(void **map);
 grant_ref_t gnttab_grant_access(domid_t domid, unsigned long frame,
                                int readonly);
 grant_ref_t gnttab_grant_transfer(domid_t domid, unsigned long pfn);
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.