Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753487AbdCNRgp (ORCPT ); Tue, 14 Mar 2017 13:36:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50292 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbdCNRgi (ORCPT ); Tue, 14 Mar 2017 13:36:38 -0400 From: Vitaly Kuznetsov To: xen-devel@lists.xenproject.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Boris Ostrovsky , Juergen Gross , Andrew Jones Subject: [PATCH v3 19/21] xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds Date: Tue, 14 Mar 2017 18:35:54 +0100 Message-Id: <20170314173556.2249-20-vkuznets@redhat.com> In-Reply-To: <20170314173556.2249-1-vkuznets@redhat.com> References: <20170314173556.2249-1-vkuznets@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 14 Mar 2017 17:36:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 Lines: 42 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 Reviewed-by: Juergen Gross --- include/xen/xen-ops.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index b5486e6..f939114 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h @@ -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; -- 2.9.3