Skip to content

Commit f900557

Browse files
stefano-xilinxjgross1
authored andcommitted
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: <[email protected]> # 4.12 Fixes: 1662439 ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds") Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Juergen Gross <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 7a048ce commit f900557

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

include/xen/xen-ops.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,12 @@ int xen_setup_shutdown_event(void);
4242

4343
extern unsigned long *xen_contiguous_bitmap;
4444

45-
#ifdef CONFIG_XEN_PV
45+
#if defined(CONFIG_XEN_PV) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
4646
int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
4747
unsigned int address_bits,
4848
dma_addr_t *dma_handle);
4949

5050
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);
5551
#else
5652
static inline int xen_create_contiguous_region(phys_addr_t pstart,
5753
unsigned int order,
@@ -63,7 +59,13 @@ static inline int xen_create_contiguous_region(phys_addr_t pstart,
6359

6460
static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
6561
unsigned int order) { }
62+
#endif
6663

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
6769
static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
6870
xen_pfn_t *pfn, int nr, int *err_ptr,
6971
pgprot_t prot, unsigned int domid,

0 commit comments

Comments
 (0)