Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-drm-fsl-dcu.git] / arch / x86_64 / kernel / pci-nommu.c
index c4c3cc36ac5b033997d5904fa5adff8fa4de54b8..6dade0c867cc68bd2319eadcf42e4820d42474f2 100644 (file)
@@ -59,7 +59,6 @@ int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
 {
        int i;
 
-       BUG_ON(direction == DMA_NONE);
        for (i = 0; i < nents; i++ ) {
                struct scatterlist *s = &sg[i];
                BUG_ON(!s->page);
@@ -80,7 +79,7 @@ void nommu_unmap_sg(struct device *dev, struct scatterlist *sg,
 {
 }
 
-struct dma_mapping_ops nommu_dma_ops = {
+const struct dma_mapping_ops nommu_dma_ops = {
        .map_single = nommu_map_single,
        .unmap_single = nommu_unmap_single,
        .map_sg = nommu_map_sg,
@@ -92,5 +91,7 @@ void __init no_iommu_init(void)
 {
        if (dma_ops)
                return;
+
+       force_iommu = 0; /* no HW IOMMU */
        dma_ops = &nommu_dma_ops;
 }