diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-12-08 13:54:32 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-01-11 14:31:41 -0500 |
commit | ba5d1012292403c8037adf4a54c4ec50dfe846c4 (patch) | |
tree | f538a106dab612f2ac6c1cb072f8d7bc2040e71b /drivers/xen/gntdev.c | |
parent | 9329e7604fe915fd0201633d3c38adae307d56a5 (diff) |
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 <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/gntdev.c')
-rw-r--r-- | drivers/xen/gntdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
209 | u64 pte_maddr; | 209 | u64 pte_maddr; |
210 | 210 | ||
211 | BUG_ON(pgnr >= map->count); | 211 | BUG_ON(pgnr >= map->count); |
212 | pte_maddr = (u64)pfn_to_mfn(page_to_pfn(token)) << PAGE_SHIFT; | 212 | pte_maddr = arbitrary_virt_to_machine(pte).maddr; |
213 | pte_maddr += (unsigned long)pte & ~PAGE_MASK; | 213 | |
214 | gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr, | 214 | gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr, |
215 | GNTMAP_contains_pte | map->flags, | 215 | GNTMAP_contains_pte | map->flags, |
216 | map->grants[pgnr].ref, | 216 | map->grants[pgnr].ref, |