mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-27 20:07:09 +00:00
powerpc/vio: Remove dma not supported warnings
During boot we see a number of these warnings: vio 30000000: Warning: IOMMU dma not supported: mask 0xffffffffffffffff, table unavailable The reason for this is that we set IOMMU properties for all VIO devices even if they are not DMA capable. Only set DMA ops, table and mask for devices with a DMA window. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
9c41ef086e
commit
62761d1f68
@ -1397,21 +1397,27 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
|
|||||||
viodev->name = of_node->name;
|
viodev->name = of_node->name;
|
||||||
viodev->dev.of_node = of_node_get(of_node);
|
viodev->dev.of_node = of_node_get(of_node);
|
||||||
|
|
||||||
if (firmware_has_feature(FW_FEATURE_CMO))
|
|
||||||
vio_cmo_set_dma_ops(viodev);
|
|
||||||
else
|
|
||||||
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));
|
set_dev_node(&viodev->dev, of_node_to_nid(of_node));
|
||||||
|
|
||||||
/* init generic 'struct device' fields: */
|
/* init generic 'struct device' fields: */
|
||||||
viodev->dev.parent = &vio_bus_device.dev;
|
viodev->dev.parent = &vio_bus_device.dev;
|
||||||
viodev->dev.bus = &vio_bus_type;
|
viodev->dev.bus = &vio_bus_type;
|
||||||
viodev->dev.release = vio_dev_release;
|
viodev->dev.release = vio_dev_release;
|
||||||
/* needed to ensure proper operation of coherent allocations
|
|
||||||
* later, in case driver doesn't set it explicitly */
|
if (of_get_property(viodev->dev.of_node, "ibm,my-dma-window", NULL)) {
|
||||||
dma_set_mask(&viodev->dev, DMA_BIT_MASK(64));
|
if (firmware_has_feature(FW_FEATURE_CMO))
|
||||||
dma_set_coherent_mask(&viodev->dev, DMA_BIT_MASK(64));
|
vio_cmo_set_dma_ops(viodev);
|
||||||
|
else
|
||||||
|
set_dma_ops(&viodev->dev, &dma_iommu_ops);
|
||||||
|
|
||||||
|
set_iommu_table_base(&viodev->dev,
|
||||||
|
vio_build_iommu_table(viodev));
|
||||||
|
|
||||||
|
/* needed to ensure proper operation of coherent allocations
|
||||||
|
* later, in case driver doesn't set it explicitly */
|
||||||
|
dma_set_mask(&viodev->dev, DMA_BIT_MASK(64));
|
||||||
|
dma_set_coherent_mask(&viodev->dev, DMA_BIT_MASK(64));
|
||||||
|
}
|
||||||
|
|
||||||
/* register with generic device framework */
|
/* register with generic device framework */
|
||||||
if (device_register(&viodev->dev)) {
|
if (device_register(&viodev->dev)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user