diff options
author | Stefano Stabellini <stefanos@xilinx.com> | 2018-10-31 19:11:49 -0400 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2018-11-02 12:18:34 -0400 |
commit | f9005571701920551bcf54a500973fb61f2e1eda (patch) | |
tree | 40c16d613ee24ec81ff665663522e366e5ff6f7b /include/xen | |
parent | 7a048cec598e1761cdcd63eb3a3c6e390b7661c7 (diff) |
CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM
xen_create_contiguous_region has now only an implementation if
CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but
we do have an implementation of xen_create_contiguous_region which is
required for swiotlb-xen to work correctly (although it just sets
*dma_handle).
Cc: <stable@vger.kernel.org> # 4.12
Fixes: 16624390816c ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds")
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
CC: Jeff.Kubascik@dornerworks.com
CC: Jarvis.Roach@dornerworks.com
CC: Nathan.Studer@dornerworks.com
CC: vkuznets@redhat.com
CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
CC: julien.grall@arm.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/xen-ops.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 18803ff76e27..4969817124a8 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h | |||
@@ -42,16 +42,12 @@ int xen_setup_shutdown_event(void); | |||
42 | 42 | ||
43 | extern unsigned long *xen_contiguous_bitmap; | 43 | extern unsigned long *xen_contiguous_bitmap; |
44 | 44 | ||
45 | #ifdef CONFIG_XEN_PV | 45 | #if defined(CONFIG_XEN_PV) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) |
46 | int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, | 46 | int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, |
47 | unsigned int address_bits, | 47 | unsigned int address_bits, |
48 | dma_addr_t *dma_handle); | 48 | dma_addr_t *dma_handle); |
49 | 49 | ||
50 | void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); | 50 | void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); |
51 | |||
52 | int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr, | ||
53 | xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot, | ||
54 | unsigned int domid, bool no_translate, struct page **pages); | ||
55 | #else | 51 | #else |
56 | static inline int xen_create_contiguous_region(phys_addr_t pstart, | 52 | static inline int xen_create_contiguous_region(phys_addr_t pstart, |
57 | unsigned int order, | 53 | unsigned int order, |
@@ -63,7 +59,13 @@ static inline int xen_create_contiguous_region(phys_addr_t pstart, | |||
63 | 59 | ||
64 | static inline void xen_destroy_contiguous_region(phys_addr_t pstart, | 60 | static inline void xen_destroy_contiguous_region(phys_addr_t pstart, |
65 | unsigned int order) { } | 61 | unsigned int order) { } |
62 | #endif | ||
66 | 63 | ||
64 | #if defined(CONFIG_XEN_PV) | ||
65 | int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr, | ||
66 | xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot, | ||
67 | unsigned int domid, bool no_translate, struct page **pages); | ||
68 | #else | ||
67 | static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr, | 69 | static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr, |
68 | xen_pfn_t *pfn, int nr, int *err_ptr, | 70 | xen_pfn_t *pfn, int nr, int *err_ptr, |
69 | pgprot_t prot, unsigned int domid, | 71 | pgprot_t prot, unsigned int domid, |