Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>
---
 arch/x86/kernel/pci-nommu.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index 1c1c98a..0cbecb9 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -115,16 +115,28 @@ static void nommu_free_coherent(struct device *dev, 
size_t size, void *vaddr,
        free_pages((unsigned long)vaddr, get_order(size));
 }
 
+static int nommu_device_supported(struct device *dev)
+{
+       return 1;
+}
+
 struct dma_mapping_ops nommu_dma_ops = {
        .alloc_coherent = nommu_alloc_coherent,
        .free_coherent = nommu_free_coherent,
        .map_single = nommu_map_single,
        .map_sg = nommu_map_sg,
+       .device_supported = nommu_device_supported,
        .is_phys = 1,
 };
 
 void __init no_iommu_init(void)
 {
+       /*
+        * we always want nommu to be the last fallback if no
+        * other dma_ops implementation feels responsible
+        */
+       x86_register_dma_ops(&nommu_dma_ops, DMA_OPS_TYPE_SOFT);
+
        if (dma_ops)
                return;
 
-- 
1.5.6.4


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to