diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2019-06-21 19:19:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-26 09:11:10 +0200 |
commit | 58fae3632c7a90216e1969cafb1690e7a9525452 (patch) | |
tree | 71ed59e0f4fd6d72cc5d58a063d9768730bb66a0 | |
parent | 320a36ce38021b2628ba20ab6f339127614b6ec7 (diff) | |
download | linux-stable-58fae3632c7a90216e1969cafb1690e7a9525452.tar.gz linux-stable-58fae3632c7a90216e1969cafb1690e7a9525452.tar.bz2 linux-stable-58fae3632c7a90216e1969cafb1690e7a9525452.zip |
intel_th: msu: Fix single mode with disabled IOMMU
commit 918b8646497b5dba6ae82d4a7325f01b258972b9 upstream.
Commit 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") switched
the single mode code to use dma mapping pages obtained from the page
allocator, but with IOMMU disabled, that may lead to using SWIOTLB bounce
buffers and without additional sync'ing, produces empty trace buffers.
Fix this by using a DMA32 GFP flag to the page allocation in single mode,
as the device supports full 32-bit DMA addressing.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Ammy Yi <ammy.yi@intel.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190621161930.60785-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/hwtracing/intel_th/msu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 6bfce03c6489..cfd48c81b9d9 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -667,7 +667,7 @@ static int msc_buffer_contig_alloc(struct msc *msc, unsigned long size) goto err_out; ret = -ENOMEM; - page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order); + page = alloc_pages(GFP_KERNEL | __GFP_ZERO | GFP_DMA32, order); if (!page) goto err_free_sgt; |