From patchwork Wed Apr 25 05:15:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10361563 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A6D65601BE for ; Wed, 25 Apr 2018 05:16:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98F0628B8B for ; Wed, 25 Apr 2018 05:16:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DCB928F2A; Wed, 25 Apr 2018 05:16:53 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 3E7D928B8B for ; Wed, 25 Apr 2018 05:16:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbeDYFQv (ORCPT ); Wed, 25 Apr 2018 01:16:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52778 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbeDYFQs (ORCPT ); Wed, 25 Apr 2018 01:16:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding: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=wWeeMK/OGPFNhg62rEG7YNxHCRAWoCl5VpvwITCHOhY=; b=bqhbwX8Iw2BFkrPvQsD0G1khO yBQ638vSzpGxbcJK2bP/pBM5EuGiudG1yHv/0mdGnahPKW6nyxt5jupBPfB2lvDYlMH+oe2ou/G5T qxaxPA5saJ1m4+Rl7FNjy3R5M8UicC1y8K1LOgIdz+Jd+HrzsnLXbsPz7M3JbqZ4kY+h9CTISn+8p 5GFdfKBHCtdmxK/R4x+2r5j6ilPhP/y0ydjn0/aTQvvyEFKZf3ndNvXzBZcaG2/tO7mZf6sUlgCXc dDtwWiZDTv3StOmuc49jBKR/Mdh8NqwJPBQ7F+vu/405LtDZ5QSd3u97ZSdc8zXhMKnLROJxMii3m sPheJy7Vg==; Received: from [93.83.86.253] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBCn5-0005MH-7w; Wed, 25 Apr 2018 05:16:27 +0000 From: Christoph Hellwig To: Konrad Rzeszutek Wilk , iommu@lists.linux-foundation.org Cc: sstabellini@kernel.org, x86@kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, linux-mips@linux-mips.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 13/13] swiotlb: remove the CONFIG_DMA_DIRECT_OPS ifdefs Date: Wed, 25 Apr 2018 07:15:39 +0200 Message-Id: <20180425051539.1989-14-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425051539.1989-1-hch@lst.de> References: <20180425051539.1989-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP swiotlb now selects the DMA_DIRECT_OPS config symbol, so this will always be true. Signed-off-by: Christoph Hellwig --- lib/swiotlb.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/swiotlb.c b/lib/swiotlb.c index fece57566d45..6954f7ad200a 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -692,7 +692,6 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, } } -#ifdef CONFIG_DMA_DIRECT_OPS static inline bool dma_coherent_ok(struct device *dev, dma_addr_t addr, size_t size) { @@ -764,7 +763,6 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size, DMA_ATTR_SKIP_CPU_SYNC); return true; } -#endif static void swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir, @@ -1045,7 +1043,6 @@ swiotlb_dma_supported(struct device *hwdev, u64 mask) return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask; } -#ifdef CONFIG_DMA_DIRECT_OPS void *swiotlb_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) { @@ -1089,4 +1086,3 @@ const struct dma_map_ops swiotlb_dma_ops = { .unmap_page = swiotlb_unmap_page, .dma_supported = dma_direct_supported, }; -#endif /* CONFIG_DMA_DIRECT_OPS */