From patchwork Sat Oct 13 15:17:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10640277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8529317E1 for ; Sat, 13 Oct 2018 15:17:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7662B28F6A for ; Sat, 13 Oct 2018 15:17:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AADD29ABE; Sat, 13 Oct 2018 15:17:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 228B228F6A for ; Sat, 13 Oct 2018 15:17:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF11C6E0F0; Sat, 13 Oct 2018 15:17:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58EB76E0F0 for ; Sat, 13 Oct 2018 15:17:16 +0000 (UTC) Received: from 089144199123.atnat0008.highway.a1.net ([89.144.199.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBLfH-0004zy-7L; Sat, 13 Oct 2018 15:17:15 +0000 From: Christoph Hellwig To: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-spi@vger.kernel.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 2/8] firmware: tegra: don't pass GFP_DMA32 to dma_alloc_coherent Date: Sat, 13 Oct 2018 17:17:01 +0200 Message-Id: <20181013151707.32210-3-hch@lst.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181013151707.32210-1-hch@lst.de> References: <20181013151707.32210-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The DMA API does its own zone decisions based on the coherent_dma_mask. Signed-off-by: Christoph Hellwig --- 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;