From: Jeremy Fitzhardinge Date: Wed, 8 Dec 2010 18:54:32 +0000 (-0800) Subject: xen/gntdev: stop using "token" argument X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ba5d1012292403c8037adf4a54c4ec50dfe846c4;p=linux-beck.git xen/gntdev: stop using "token" argument 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 Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 888d76307d59..a2ea5335e152 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -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,