diff options
| -rw-r--r-- | arch/arm/xen/p2m.c | 5 | ||||
| -rw-r--r-- | drivers/xen/grant-table.c | 6 | ||||
| -rw-r--r-- | drivers/xen/swiotlb-xen.c | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index 23732cdff551..b31ee1b275b0 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c | |||
| @@ -25,8 +25,9 @@ struct xen_p2m_entry { | |||
| 25 | struct rb_node rbnode_phys; | 25 | struct rb_node rbnode_phys; |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | rwlock_t p2m_lock; | 28 | static rwlock_t p2m_lock; |
| 29 | struct rb_root phys_to_mach = RB_ROOT; | 29 | struct rb_root phys_to_mach = RB_ROOT; |
| 30 | EXPORT_SYMBOL_GPL(phys_to_mach); | ||
| 30 | static struct rb_root mach_to_phys = RB_ROOT; | 31 | static struct rb_root mach_to_phys = RB_ROOT; |
| 31 | 32 | ||
| 32 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) | 33 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) |
| @@ -200,7 +201,7 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
| 200 | } | 201 | } |
| 201 | EXPORT_SYMBOL_GPL(__set_phys_to_machine); | 202 | EXPORT_SYMBOL_GPL(__set_phys_to_machine); |
| 202 | 203 | ||
| 203 | int p2m_init(void) | 204 | static int p2m_init(void) |
| 204 | { | 205 | { |
| 205 | rwlock_init(&p2m_lock); | 206 | rwlock_init(&p2m_lock); |
| 206 | return 0; | 207 | return 0; |
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 62ccf5424ba8..028387192b60 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
| @@ -930,9 +930,10 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, | |||
| 930 | ret = m2p_add_override(mfn, pages[i], kmap_ops ? | 930 | ret = m2p_add_override(mfn, pages[i], kmap_ops ? |
| 931 | &kmap_ops[i] : NULL); | 931 | &kmap_ops[i] : NULL); |
| 932 | if (ret) | 932 | if (ret) |
| 933 | return ret; | 933 | goto out; |
| 934 | } | 934 | } |
| 935 | 935 | ||
| 936 | out: | ||
| 936 | if (lazy) | 937 | if (lazy) |
| 937 | arch_leave_lazy_mmu_mode(); | 938 | arch_leave_lazy_mmu_mode(); |
| 938 | 939 | ||
| @@ -969,9 +970,10 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, | |||
| 969 | ret = m2p_remove_override(pages[i], kmap_ops ? | 970 | ret = m2p_remove_override(pages[i], kmap_ops ? |
| 970 | &kmap_ops[i] : NULL); | 971 | &kmap_ops[i] : NULL); |
| 971 | if (ret) | 972 | if (ret) |
| 972 | return ret; | 973 | goto out; |
| 973 | } | 974 | } |
| 974 | 975 | ||
| 976 | out: | ||
| 975 | if (lazy) | 977 | if (lazy) |
| 976 | arch_leave_lazy_mmu_mode(); | 978 | arch_leave_lazy_mmu_mode(); |
| 977 | 979 | ||
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index a224bc74b6b9..1eac0731c349 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
| @@ -555,6 +555,11 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, | |||
| 555 | sg_dma_len(sgl) = 0; | 555 | sg_dma_len(sgl) = 0; |
| 556 | return 0; | 556 | return 0; |
| 557 | } | 557 | } |
| 558 | xen_dma_map_page(hwdev, pfn_to_page(map >> PAGE_SHIFT), | ||
| 559 | map & ~PAGE_MASK, | ||
| 560 | sg->length, | ||
| 561 | dir, | ||
| 562 | attrs); | ||
| 558 | sg->dma_address = xen_phys_to_bus(map); | 563 | sg->dma_address = xen_phys_to_bus(map); |
| 559 | } else { | 564 | } else { |
| 560 | /* we are not interested in the dma_addr returned by | 565 | /* we are not interested in the dma_addr returned by |
