lkml.org 
[lkml]   [2018]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/8] firmware: tegra: don't pass GFP_DMA32 to dma_alloc_coherent
Date
The DMA API does its own zone decisions based on the coherent_dma_mask.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/firmware/tegra/bpmp-debugfs.c | 11 +++++------
drivers/firmware/tegra/bpmp.c | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
index f7f6a0a5cb07..567160897bac 100644
--- a/drivers/firmware/tegra/bpmp-debugfs.c
+++ b/drivers/firmware/tegra/bpmp-debugfs.c
@@ -218,12 +218,12 @@ static int debugfs_show(struct seq_file *m, void *p)
return -ENOENT;

namevirt = dma_alloc_coherent(bpmp->dev, namesize, &namephys,
- GFP_KERNEL | GFP_DMA32);
+ GFP_KERNEL);
if (!namevirt)
return -ENOMEM;

datavirt = dma_alloc_coherent(bpmp->dev, datasize, &dataphys,
- GFP_KERNEL | GFP_DMA32);
+ GFP_KERNEL);
if (!datavirt) {
ret = -ENOMEM;
goto free_namebuf;
@@ -269,12 +269,12 @@ static ssize_t debugfs_store(struct file *file, const char __user *buf,
return -ENOENT;

namevirt = dma_alloc_coherent(bpmp->dev, namesize, &namephys,
- GFP_KERNEL | GFP_DMA32);
+ GFP_KERNEL);
if (!namevirt)
return -ENOMEM;

datavirt = dma_alloc_coherent(bpmp->dev, datasize, &dataphys,
- GFP_KERNEL | GFP_DMA32);
+ GFP_KERNEL);
if (!datavirt) {
ret = -ENOMEM;
goto free_namebuf;
@@ -422,8 +422,7 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
if (!root)
return -ENOMEM;

- virt = dma_alloc_coherent(bpmp->dev, sz, &phys,
- GFP_KERNEL | GFP_DMA32);
+ virt = dma_alloc_coherent(bpmp->dev, sz, &phys, GFP_KERNEL);
if (!virt) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index 14a456afa379..e6d2356ccec3 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -531,7 +531,7 @@ static int tegra_bpmp_get_firmware_tag(struct tegra_bpmp *bpmp, char *tag,
int err;

virt = dma_alloc_coherent(bpmp->dev, MSG_DATA_MIN_SZ, &phys,
- GFP_KERNEL | GFP_DMA32);
+ GFP_KERNEL);
if (!virt)
return -ENOMEM;

--
2.19.1
\
 
 \ /
  Last update: 2018-10-13 17:18    [W:0.283 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site