WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 10/10] xen/swiotlb: define xen_wants_swiotlb when PCI

To: Ingo Molnar <mingo@xxxxxxx>
Subject: [Xen-devel] [PATCH 10/10] xen/swiotlb: define xen_wants_swiotlb when PCI_XEN is not enabled
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 12 May 2009 14:50:51 -0700
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Joerg Roedel <joerg.roedel@xxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
Delivery-date: Tue, 12 May 2009 16:38:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1242165051-6636-1-git-send-email-jeremy@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1242165051-6636-1-git-send-email-jeremy@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>

If CONFIG_PCI is disabled, CONFIG_SWIOTLB can still be enabled on x86-64,
which calls xen_wants_swiotlb().  Define a stub version when CONFIG_PCI
(and, implicitly, CONFIG_PCI_XEN) is not enabled.

[ Impact: compile fix with !CONFIG_PCI ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 include/xen/swiotlb.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/xen/swiotlb.h b/include/xen/swiotlb.h
index f35183b..75d1da1 100644
--- a/include/xen/swiotlb.h
+++ b/include/xen/swiotlb.h
@@ -5,6 +5,14 @@ extern void xen_swiotlb_fixup(void *buf, size_t size, unsigned 
long nslabs);
 extern phys_addr_t xen_bus_to_phys(dma_addr_t daddr);
 extern dma_addr_t xen_phys_to_bus(phys_addr_t paddr);
 extern int xen_range_needs_mapping(phys_addr_t phys, size_t size);
+
+#ifdef CONFIG_PCI_XEN
 extern int xen_wants_swiotlb(void);
+#else
+static inline int xen_wants_swiotlb(void)
+{
+       return 0;
+}
+#endif
 
 #endif /* _XEN_SWIOTLB_H */
-- 
1.6.0.6


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel