xen/swiotlb: Pass addresses rather than frame numbers to xen_arch_need_swiotlb
With 64KB page granularity support, the frame number will be different. It will be easier to modify the behavior in a single place rather than in each caller. Signed-off-by: Julien Grall <julien.grall@citrix.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
This commit is contained in:
committed by
David Vrabel
parent
250c9af3d8
commit
291be10fd7
@ -138,9 +138,12 @@ void __xen_dma_sync_single_for_device(struct device *hwdev,
|
||||
}
|
||||
|
||||
bool xen_arch_need_swiotlb(struct device *dev,
|
||||
unsigned long pfn,
|
||||
unsigned long bfn)
|
||||
phys_addr_t phys,
|
||||
dma_addr_t dev_addr)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(phys);
|
||||
unsigned long bfn = PFN_DOWN(dev_addr);
|
||||
|
||||
return (!hypercall_cflush && (pfn != bfn) && !is_device_dma_coherent(dev));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user