ARC: dma: fix address translation in arc_dma_free
authorVladimir Kondratiev <vladimir.kondratiev@intel.com>
Sun, 3 Jul 2016 07:07:48 +0000 (10:07 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Wed, 20 Jul 2016 16:54:22 +0000 (09:54 -0700)
commitb4dff2874006e54b60ce4f4dbcfec9ab81c6aff4
tree5e1305e3d3287a8a270e116fd17b92d15b5ce319
parent627c88b68f0b7a1c4c1f12c8c4628e684f2185e2
ARC: dma: fix address translation in arc_dma_free

page should be calculated using physical address.
If platform uses non-trivial dma-to-phys memory translation,
dma_handle should be converted to physicval address before
calculation of page.

Failing to do so results in struct page * pointing to
wrong or non-existent memory.

Fixes: f2e3d55397ff ("ARC: dma: reintroduce platform specific dma<->phys")
Cc: stable@vger.kernel.org #4.6+
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@intel.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/mm/dma.c