intel_th: msu: Fix single mode with IOMMU
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 3 May 2019 08:44:34 +0000 (11:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 May 2019 16:14:29 +0000 (18:14 +0200)
commit4e0eaf239fb33ebc671303e2b736fa043462e2f4
tree1980fc041375e4b2e09ca102a09aa5b20a03e87d
parent9a552e271e0ddf0911773cf34b28d11ebb96b1da
intel_th: msu: Fix single mode with IOMMU

Currently, the pages that are allocated for the single mode of MSC are not
mapped into the device's dma space and the code is incorrectly using
*_to_phys() in place of a dma address. This fails with IOMMU enabled and
is otherwise bad practice.

Fix the single mode buffer allocation to map the pages into the device's
DMA space.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: ba82664c134e ("intel_th: Add Memory Storage Unit driver")
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/intel_th/msu.c