xen/gntdev: stop using "token" argument
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 8 Dec 2010 18:54:32 +0000 (10:54 -0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 11 Jan 2011 19:31:41 +0000 (14:31 -0500)
It's the struct page of the L1 pte page.  But we can get its mfn
by simply doing an arbitrary_virt_to_machine() on it anyway (which is
the safe conservative choice; since we no longer allow HIGHPTE pages,
we would never expect to be operating on a mapped pte page).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/gntdev.c

index 888d76307d594903e20ce097d6cee270d1e1465b..a2ea5335e152fb9cd4736a27a57d4b7f4e82b402 100644 (file)
@@ -209,8 +209,8 @@ static int find_grant_ptes(pte_t *pte, pgtable_t token,
        u64 pte_maddr;
 
        BUG_ON(pgnr >= map->count);
-       pte_maddr  = (u64)pfn_to_mfn(page_to_pfn(token)) << PAGE_SHIFT;
-       pte_maddr += (unsigned long)pte & ~PAGE_MASK;
+       pte_maddr = arbitrary_virt_to_machine(pte).maddr;
+
        gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr,
                          GNTMAP_contains_pte | map->flags,
                          map->grants[pgnr].ref,