diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2013-10-10 13:41:10 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2013-10-10 13:41:10 +0000 |
commit | 1b65c4e5a9af1a1c61e792e2d0ed481e0c1f21a9 (patch) | |
tree | 15c7b03e6efede8905f3729de488341c9a9da81b /include/xen | |
parent | d6fe76c58c358498b91d21f0ca8054f6aa6e672d (diff) | |
download | linux-1b65c4e5a9af1a1c61e792e2d0ed481e0c1f21a9.tar.gz linux-1b65c4e5a9af1a1c61e792e2d0ed481e0c1f21a9.tar.bz2 linux-1b65c4e5a9af1a1c61e792e2d0ed481e0c1f21a9.zip |
swiotlb-xen: use xen_alloc/free_coherent_pages
Use xen_alloc_coherent_pages and xen_free_coherent_pages to allocate or
free coherent pages.
We need to be careful handling the pointer returned by
xen_alloc_coherent_pages, because on ARM the pointer is not equal to
phys_to_virt(*dma_handle). In fact virt_to_phys only works for kernel
direct mapped RAM memory.
In ARM case the pointer could be an ioremap address, therefore passing
it to virt_to_phys would give you another physical address that doesn't
correspond to it.
Make xen_create_contiguous_region take a phys_addr_t as start parameter to
avoid the virt_to_phys calls which would be incorrect.
Changes in v6:
- remove extra spaces.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/xen-ops.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 9ef704d3a9dd..fb2ea8f26552 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h @@ -19,11 +19,11 @@ void xen_arch_resume(void); int xen_setup_shutdown_event(void); extern unsigned long *xen_contiguous_bitmap; -int xen_create_contiguous_region(unsigned long vstart, unsigned int order, +int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, unsigned int address_bits, dma_addr_t *dma_handle); -void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order); +void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); struct vm_area_struct; int xen_remap_domain_mfn_range(struct vm_area_struct *vma, |