[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Avoid misleading message about 'not using swiotlb' on x86/64
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 1d36cca98fc3710643483e5a5648b7ae317c735d # Parent 47013962e41102677b95d1422a5e7bddfd1e125f Avoid misleading message about 'not using swiotlb' on x86/64 domain0. Provide a temporary glue between our swiotlb implementation and x86/64's dma_ops dynamic dma-mapping infrastructure. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 47013962e411 -r 1d36cca98fc3 linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile Fri Feb 10 02:23:36 2006 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile Fri Feb 10 11:35:19 2006 @@ -59,7 +59,7 @@ microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o quirks-y := ../../i386/kernel/quirks-xen.o -n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o pci-swiotlb.o +n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o include $(srctree)/scripts/Makefile.xen diff -r 47013962e411 -r 1d36cca98fc3 linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c --- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c Fri Feb 10 02:23:36 2006 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c Fri Feb 10 11:35:19 2006 @@ -869,7 +869,7 @@ memset(contiguous_bitmap, 0, (end_pfn + 2*BITS_PER_LONG) >> 3); #if defined(CONFIG_SWIOTLB) - swiotlb_init(); + pci_swiotlb_init(); #endif no_iommu_init(); diff -r 47013962e411 -r 1d36cca98fc3 linux-2.6-xen-sparse/arch/x86_64/kernel/pci-swiotlb-xen.c --- /dev/null Fri Feb 10 02:23:36 2006 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/pci-swiotlb-xen.c Fri Feb 10 11:35:19 2006 @@ -0,0 +1,54 @@ +/* Glue code to lib/swiotlb.c */ + +#include <linux/pci.h> +#include <linux/cache.h> +#include <linux/module.h> +#include <asm/dma-mapping.h> +#include <asm/proto.h> +#include <asm/swiotlb.h> +#include <asm/dma.h> + +#if 0 +int swiotlb __read_mostly; +EXPORT_SYMBOL(swiotlb); +#endif + +struct dma_mapping_ops swiotlb_dma_ops = { +#if 0 + .mapping_error = swiotlb_dma_mapping_error, + .alloc_coherent = swiotlb_alloc_coherent, + .free_coherent = swiotlb_free_coherent, + .map_single = swiotlb_map_single, + .unmap_single = swiotlb_unmap_single, + .sync_single_for_cpu = swiotlb_sync_single_for_cpu, + .sync_single_for_device = swiotlb_sync_single_for_device, + .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, + .sync_single_range_for_device = swiotlb_sync_single_range_for_device, + .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, + .sync_sg_for_device = swiotlb_sync_sg_for_device, + .map_sg = swiotlb_map_sg, + .unmap_sg = swiotlb_unmap_sg, + .dma_supported = NULL, +#endif +}; + +void pci_swiotlb_init(void) +{ +#if 0 + /* don't initialize swiotlb if iommu=off (no_iommu=1) */ + if (!iommu_aperture && !no_iommu && + (end_pfn > MAX_DMA32_PFN || force_iommu)) + swiotlb = 1; + if (swiotlb) { + swiotlb_init(); + printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); + dma_ops = &swiotlb_dma_ops; + } +#else + swiotlb_init(); + if (swiotlb) { + printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); + dma_ops = &swiotlb_dma_ops; + } +#endif +} _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |