Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229303
b: refs/heads/master
c: 6d283d7
h: refs/heads/master
i:
  229301: 4704211
  229299: 65dec2a
  229295: a985abe
v: v3
  • Loading branch information
Nishanth Aravamudan authored and Benjamin Herrenschmidt committed Nov 29, 2010
1 parent 8f69976 commit 3bd98fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72b962d3bba19657abaa6cc8806661ecbde5ee92
refs/heads/master: 6d283d782f9fbafee5c672bfdaff4c10f6fdc788
11 changes: 8 additions & 3 deletions trunk/arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,19 @@ static void vio_dma_iommu_unmap_sg(struct device *dev,
vio_cmo_dealloc(viodev, alloc_size);
}

static int vio_dma_iommu_dma_supported(struct device *dev, u64 mask)
{
return dma_iommu_ops.dma_supported(dev, mask);
}

struct dma_map_ops vio_dma_mapping_ops = {
.alloc_coherent = vio_dma_iommu_alloc_coherent,
.free_coherent = vio_dma_iommu_free_coherent,
.map_sg = vio_dma_iommu_map_sg,
.unmap_sg = vio_dma_iommu_unmap_sg,
.map_page = vio_dma_iommu_map_page,
.unmap_page = vio_dma_iommu_unmap_page,
.dma_supported = vio_dma_iommu_dma_supported,

};

Expand Down Expand Up @@ -858,8 +864,7 @@ static void vio_cmo_bus_remove(struct vio_dev *viodev)

static void vio_cmo_set_dma_ops(struct vio_dev *viodev)
{
vio_dma_mapping_ops.dma_supported = dma_iommu_ops.dma_supported;
viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops;
set_dma_ops(&viodev->dev, &vio_dma_mapping_ops);
}

/**
Expand Down Expand Up @@ -1244,7 +1249,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
if (firmware_has_feature(FW_FEATURE_CMO))
vio_cmo_set_dma_ops(viodev);
else
viodev->dev.archdata.dma_ops = &dma_iommu_ops;
set_dma_ops(&viodev->dev, &dma_iommu_ops);
set_iommu_table_base(&viodev->dev, vio_build_iommu_table(viodev));
set_dev_node(&viodev->dev, of_node_to_nid(of_node));

Expand Down

0 comments on commit 3bd98fa

Please sign in to comment.