]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 14 Mar 2017 17:35:54 +0000 (18:35 +0100)
committerJuergen Gross <jgross@suse.com>
Tue, 2 May 2017 09:10:06 +0000 (11:10 +0200)
xen_create_contiguous_region()/xen_create_contiguous_region() are PV-only,
they both contain xen_feature(XENFEAT_auto_translated_physmap) check and
bail in the very beginning.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
include/xen/xen-ops.h

index b5486e64860759aed11763ac983b3b4aa12988b3..f93911452f9e1cef9a82138828fd361df091b51f 100644 (file)
@@ -34,11 +34,25 @@ u64 xen_steal_clock(int cpu);
 int xen_setup_shutdown_event(void);
 
 extern unsigned long *xen_contiguous_bitmap;
+
+#ifdef CONFIG_XEN_PV
 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);
+#else
+static inline int xen_create_contiguous_region(phys_addr_t pstart,
+                                              unsigned int order,
+                                              unsigned int address_bits,
+                                              dma_addr_t *dma_handle)
+{
+       return 0;
+}
+
+static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
+                                                unsigned int order) { }
+#endif
 
 struct vm_area_struct;