提交 10862a0c 编写于 作者: L Li Zhong 提交者: Benjamin Herrenschmidt

powerpc: Revert c6102609 and replace it with the correct fix for vio dma mask setting

This patch reverts my previous "fix", and replace it with the correct
fix from Russell.

And as Russell pointed out -- dma_set_mask_and_coherent() (and the other
dma_set_mask() functions) are really supposed to be used by drivers
only.
Signed-off-by: NLi Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 84744377
...@@ -1432,7 +1432,8 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) ...@@ -1432,7 +1432,8 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
/* needed to ensure proper operation of coherent allocations /* needed to ensure proper operation of coherent allocations
* later, in case driver doesn't set it explicitly */ * later, in case driver doesn't set it explicitly */
dma_coerce_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64)); viodev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
viodev->dev.dma_mask = &viodev->dev.coherent_dma_mask;
} }
/* register with generic device framework */ /* register with generic device framework */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册