]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
gnttab: move GNTPIN_* out of header file
authorJan Beulich <jbeulich@suse.com>
Wed, 16 Aug 2017 09:02:10 +0000 (11:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 16 Aug 2017 09:02:10 +0000 (11:02 +0200)
They're private to grant_table.c.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/grant_table.c
xen/include/xen/grant_table.h

index 5e578c69ff09e4f3a17db0da8f5493470494cb55..5bfaf3889c838d32979605982dcfdd33ae729e1f 100644 (file)
@@ -158,7 +158,24 @@ shared_entry_header(struct grant_table *t, grant_ref_t ref)
 
 /* Active grant entry - used for shadowing GTF_permit_access grants. */
 struct active_grant_entry {
-    u32           pin;    /* Reference count information.             */
+    uint32_t      pin;    /* Reference count information:             */
+                          /* Count of writable host-CPU mappings.     */
+#define GNTPIN_hstw_shift    0
+#define GNTPIN_hstw_inc      (1U << GNTPIN_hstw_shift)
+#define GNTPIN_hstw_mask     (0xFFU << GNTPIN_hstw_shift)
+                          /* Count of read-only host-CPU mappings.    */
+#define GNTPIN_hstr_shift    8
+#define GNTPIN_hstr_inc      (1U << GNTPIN_hstr_shift)
+#define GNTPIN_hstr_mask     (0xFFU << GNTPIN_hstr_shift)
+                          /* Count of writable device-bus mappings.   */
+#define GNTPIN_devw_shift    16
+#define GNTPIN_devw_inc      (1U << GNTPIN_devw_shift)
+#define GNTPIN_devw_mask     (0xFFU << GNTPIN_devw_shift)
+                          /* Count of read-only device-bus mappings.  */
+#define GNTPIN_devr_shift    24
+#define GNTPIN_devr_inc      (1U << GNTPIN_devr_shift)
+#define GNTPIN_devr_mask     (0xFFU << GNTPIN_devr_shift)
+
     domid_t       domid;  /* Domain being granted access.             */
     struct domain *trans_domain;
     uint32_t      trans_gref;
index 6bf5cb27e35c5f0d70923bbbed128c9a2b66c7e4..af269a108d2ca534e37781e6f5e7229a757932ac 100644 (file)
 #include <asm/page.h>
 #include <asm/grant_table.h>
 
- /* Count of writable host-CPU mappings. */
-#define GNTPIN_hstw_shift    (0)
-#define GNTPIN_hstw_inc      (1 << GNTPIN_hstw_shift)
-#define GNTPIN_hstw_mask     (0xFFU << GNTPIN_hstw_shift)
- /* Count of read-only host-CPU mappings. */
-#define GNTPIN_hstr_shift    (8)
-#define GNTPIN_hstr_inc      (1 << GNTPIN_hstr_shift)
-#define GNTPIN_hstr_mask     (0xFFU << GNTPIN_hstr_shift)
- /* Count of writable device-bus mappings. */
-#define GNTPIN_devw_shift    (16)
-#define GNTPIN_devw_inc      (1 << GNTPIN_devw_shift)
-#define GNTPIN_devw_mask     (0xFFU << GNTPIN_devw_shift)
- /* Count of read-only device-bus mappings. */
-#define GNTPIN_devr_shift    (24)
-#define GNTPIN_devr_inc      (1 << GNTPIN_devr_shift)
-#define GNTPIN_devr_mask     (0xFFU << GNTPIN_devr_shift)
-
 #ifndef DEFAULT_MAX_NR_GRANT_FRAMES /* to allow arch to override */
 /* Default maximum size of a grant table. [POLICY] */
 #define DEFAULT_MAX_NR_GRANT_FRAMES   32