From patchwork Mon Jan 14 09:58:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10761885 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 2C50313B5 for ; Mon, 14 Jan 2019 09:58:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D32D286F7 for ; Mon, 14 Jan 2019 09:58:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FF66286FE; Mon, 14 Jan 2019 09:58:57 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC3D5286F7 for ; Mon, 14 Jan 2019 09:58:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbfANJ6z (ORCPT ); Mon, 14 Jan 2019 04:58:55 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60484 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfANJ6y (ORCPT ); Mon, 14 Jan 2019 04:58:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CIKvEsqambALdGutoiZPpIA5EvIUo191MZXIgS3IRFo=; b=RuUJggtwRqEsqKAnpt5MuTXjKA m5NcC3xAcfuNhjQ19kbCa4w0c9HEf0IVHW5bI+cR0jCSzvBqAn+9jWSObxVGpIqvQMsThj97SdQEB Gq8N8xoYniyiaP1qbbvwl4yuL4BvU1L3MDl2Gdm4g2qPy5ziJKF8xhLGPQts0EAYnITh+3xD/fdqc lD7v9fjjr567xQ9WuJ/VPPecTLKJT4a+VsUrQ1AT3iMkjzYmFy+HDq4VENIV7tLZHq95CaTSiGHpN pNLBVdJZEmqYeoxKLsFZZINfZg1ZNqyopjc0cf2+wUYuwtby2WyRx3QWvd7RQCnP55nDrFobc8yI9 YLhe/bqQ==; Received: from 089144213167.atnat0022.highway.a1.net ([89.144.213.167] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1giz12-0002VI-Iv; Mon, 14 Jan 2019 09:58:45 +0000 From: Christoph Hellwig To: Ulf Hansson Cc: Russell King , Nicolas Pitre , Aaro Koskinen , Ben Dooks , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] dma-mapping: remove dma_max_pfn Date: Mon, 14 Jan 2019 10:58:04 +0100 Message-Id: <20190114095804.27978-12-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190114095804.27978-1-hch@lst.de> References: <20190114095804.27978-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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These days the DMA mapping code must bounce buffer for any not supported address, and if they driver needs to optimize for natively supported ranged it should use dma_get_required_mask. Signed-off-by: Christoph Hellwig --- arch/arm/include/asm/dma-mapping.h | 7 ------- include/linux/dma-mapping.h | 7 ------- 2 files changed, 14 deletions(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 31d3b96f0f4b..496b36b9a7ff 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -89,13 +89,6 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) } #endif -/* The ARM override for dma_max_pfn() */ -static inline unsigned long dma_max_pfn(struct device *dev) -{ - return dma_to_pfn(dev, *dev->dma_mask); -} -#define dma_max_pfn(dev) dma_max_pfn(dev) - #define arch_setup_dma_ops arch_setup_dma_ops extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu, bool coherent); diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index f6ded992c183..c6dbc287e466 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -710,13 +710,6 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask) return -EIO; } -#ifndef dma_max_pfn -static inline unsigned long dma_max_pfn(struct device *dev) -{ - return (*dev->dma_mask >> PAGE_SHIFT) + dev->dma_pfn_offset; -} -#endif - static inline int dma_get_cache_alignment(void) { #ifdef ARCH_DMA_MINALIGN