Skip to content

Commit

Permalink
powerpc: Revert c610260 and replace it with the correct fix for vio d…
Browse files Browse the repository at this point in the history
…ma 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: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Li Zhong authored and Benjamin Herrenschmidt committed Mar 7, 2014
1 parent 8474437 commit 10862a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,8 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)

/* needed to ensure proper operation of coherent allocations
* 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 */
Expand Down

0 comments on commit 10862a0

Please sign in to comment.