Skip to content

Commit

Permalink
CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stefano-xilinx authored and jgross1 committed Nov 2, 2018
1 parent 7a048ce commit f900557
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions include/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@ int xen_setup_shutdown_event(void);

extern unsigned long *xen_contiguous_bitmap;

#ifdef CONFIG_XEN_PV
#if defined(CONFIG_XEN_PV) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
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(phys_addr_t pstart, unsigned int order);

int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
unsigned int domid, bool no_translate, struct page **pages);
#else
static inline int xen_create_contiguous_region(phys_addr_t pstart,
unsigned int order,
Expand All @@ -63,7 +59,13 @@ static inline int xen_create_contiguous_region(phys_addr_t pstart,

static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
unsigned int order) { }
#endif

#if defined(CONFIG_XEN_PV)
int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
unsigned int domid, bool no_translate, struct page **pages);
#else
static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
xen_pfn_t *pfn, int nr, int *err_ptr,
pgprot_t prot, unsigned int domid,
Expand Down

0 comments on commit f900557

Please sign in to comment.