From patchwork Thu Oct 6 07:48:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13000026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD5AFC4332F for ; Thu, 6 Oct 2022 07:49:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KpBVk4Y0nRf/kxl2CQ4LUwCd4OUtZdEhg6EHHJ3+QvA=; b=vpgw5rLExaspCs qqP4JUzI4shpfACAfrQwn3Dao70cYn1RO0vX95rZz6/NeDJHaSfus4tknCQK3Ukn0VNSEynyGT5OS pBGmMR+2w0nH5IALF9LM92CzCVetbriSoxZ+JdnIWNstZ17DnQ7WzbJpmgtooRk2jalql50mA80Tq 1VVbB8MvHhjNNEAx5JNlYSD682LZs6l5zFqAz0JT2L6lNrmQJNMMGP++u7a2VQbGpRLIVQh8SIyQS FgExi6PWviU7NrcWTNP4hVzqilGygNc1JjaFrUTsOnXd3bmY+6plFjW/xO98nb0jcIvJx4Lan3kQ1 pb53jEBm4aD/hkdishWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogLca-000UYh-Ty; Thu, 06 Oct 2022 07:48:45 +0000 Received: from [2001:4bb8:180:b914:9f51:af7e:d950:bc8d] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogLcO-000USl-Ou; Thu, 06 Oct 2022 07:48:33 +0000 From: Christoph Hellwig To: Russell King Cc: Robin Murphy , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 2/2] ARM/dma-mapping: remove the dma_coherent member of struct dev_archdata Date: Thu, 6 Oct 2022 09:48:24 +0200 Message-Id: <20221006074824.521457-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221006074824.521457-1-hch@lst.de> References: <20221006074824.521457-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit ae626eb97376 ("ARM/dma-mapping: use dma-direct unconditionally") only the dma_coherent flag in struct device is used, so remove the now write only flag in struct dev_archdata. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/device.h | 1 - arch/arm/mm/dma-mapping.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h index 8754c0f5fc904..c6beb1708c64b 100644 --- a/arch/arm/include/asm/device.h +++ b/arch/arm/include/asm/device.h @@ -9,7 +9,6 @@ struct dev_archdata { #ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping; #endif - unsigned int dma_coherent:1; unsigned int dma_ops_setup:1; }; diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index bfc7476f14114..f60d6b4afe5df 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1775,10 +1775,8 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, * here, but instead have to make sure we only set but never clear it * for now. */ - if (coherent) { - dev->archdata.dma_coherent = true; + if (coherent) dev->dma_coherent = true; - } /* * Don't override the dma_ops if they have already been set. Ideally