aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/grant_table.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-02-09 16:39:16 +0100
committerJan Beulich <jbeulich@suse.com>2012-02-09 16:39:16 +0100
commit3299823b5902cb29510efeaf2a3e1fc68c97a8f5 (patch)
tree0c6dfdb66e876d1d33f7f115b9b5a23d7a6f993f /xen/common/grant_table.c
parent66edeb2e39727952a2a909f57aaa2f614cfbb8bb (diff)
downloadxen-3299823b5902cb29510efeaf2a3e1fc68c97a8f5.tar.gz
xen-3299823b5902cb29510efeaf2a3e1fc68c97a8f5.tar.bz2
xen-3299823b5902cb29510efeaf2a3e1fc68c97a8f5.zip
gnttab: miscellaneous fixes
- _GTF_* constants name bit positions, so binary arithmetic on them is wrong - gnttab_clear_flag() cannot (on x86 and ia64 at least) simply use clear_bit(), as that may access more than the two bytes that are intended to be accessed Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/grant_table.c')
-rw-r--r--xen/common/grant_table.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 6bf611f657..8a0f38664d 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -397,7 +397,8 @@ static int _set_status_v2(domid_t domid,
(id != domid) ||
(!readonly && (flags & GTF_readonly)) )
{
- gnttab_clear_flag(_GTF_reading | _GTF_writing, status);
+ gnttab_clear_flag(_GTF_writing, status);
+ gnttab_clear_flag(_GTF_reading, status);
PIN_FAIL(done, GNTST_general_error,
"Unstable flags (%x) or dom (%d). (expected dom %d) "
"(r/w: %d)\n",
@@ -1716,14 +1717,14 @@ __release_grant_for_copy(
under the domain's grant table lock. */
/* Only safe on transitive grants. Even then, note that we don't
attempt to drop any pin on the referent grant. */
-static void __fixup_status_for_pin(struct active_grant_entry *act,
+static void __fixup_status_for_pin(const struct active_grant_entry *act,
uint16_t *status)
{
if ( !(act->pin & GNTPIN_hstw_mask) )
- *status &= ~_GTF_writing;
+ *status &= ~GTF_writing;
if ( !(act->pin & GNTPIN_hstr_mask) )
- *status &= ~_GTF_reading;
+ *status &= ~GTF_reading;
}
/* Grab a frame number from a grant entry and update the flags and pin