summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2017-02-24 16:05:22 +0200
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>2017-08-25 18:47:56 +0300
commitd5c435df4a890be0ef51f3047080756002d140dd (patch)
tree8e54399e9fcc2e4ca587e3c660c407521017d7d9 /drivers
parenta753bfcfdb1f31d74b5ec87faa19f15e8c7b44a2 (diff)
downloadlinux-d5c435df4a890be0ef51f3047080756002d140dd.tar.bz2
intel_th: msu: Use the real device in case of IOMMU domain allocation
When allocating DMA buffers for the MSU, use the real device instead of GTH. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwtracing/intel_th/msu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index dbbe31df74df..dfb57eaa9f22 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -709,17 +709,17 @@ static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks)
}
for (i = 0; i < nr_blocks; i++) {
- win->block[i].bdesc = dma_alloc_coherent(msc_dev(msc), size,
- &win->block[i].addr,
- GFP_KERNEL);
+ win->block[i].bdesc =
+ dma_alloc_coherent(msc_dev(msc)->parent->parent, size,
+ &win->block[i].addr, GFP_KERNEL);
+
+ if (!win->block[i].bdesc)
+ goto err_nomem;
#ifdef CONFIG_X86
/* Set the page as uncached */
set_memory_uc((unsigned long)win->block[i].bdesc, 1);
#endif
-
- if (!win->block[i].bdesc)
- goto err_nomem;
}
win->msc = msc;