From patchwork Sun Apr 15 14:59:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 898283 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="XUBQYRqh"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40PF7n0Clnz9s1B for ; Mon, 16 Apr 2018 01:00:53 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751622AbeDOPAv (ORCPT ); Sun, 15 Apr 2018 11:00:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60520 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752465AbeDOPAu (ORCPT ); Sun, 15 Apr 2018 11:00:50 -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=7B86t5H2GxVvRNjq6VMnMF7/UKSCK8gsOJxCjWfxowk=; b=XUBQYRqhhGM+xcSltS4Ra62di n3HGAcaQqp7VH52d34vBkF9ZpCjnDe2HGX+CjcJXb2JMsAZ4/xBxF/KUzBi2p1ZD6m/ZveCBT+F/I Zu5HjhWL/UDTlWBm+31YDTAZezETh6cWL/hiWlPc+eOLDLlhvXp+JMUGpALePlLlq7a41GKlH5NZe uqzpLKUbquv27cWSpayMgyHWP73Km+OvHrwaYOBvYF/YbGH5L7nFb8Mn4EQZWD+t/4/Qyl1xWxaG9 r+CFJFgY48ZnAOHz7bCNt8yrEG1ZwqG0pgnop2z7d0LrZ7jOoK/GFWmdsQheMPdZhh/6kjAPeGYGJ 9uA61ZjXw==; Received: from 089144200254.atnat0009.highway.a1.net ([89.144.200.254] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7j8p-00079u-7G; Sun, 15 Apr 2018 15:00:31 +0000 From: Christoph Hellwig To: Konrad Rzeszutek Wilk , iommu@lists.linux-foundation.org Cc: x86@kernel.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, linux-ide@vger.kernel.org, linux-mips@linux-mips.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 12/12] swiotlb: remove the CONFIG_DMA_DIRECT_OPS ifdefs Date: Sun, 15 Apr 2018 16:59:47 +0200 Message-Id: <20180415145947.1248-13-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180415145947.1248-1-hch@lst.de> References: <20180415145947.1248-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-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 47aeb04c1997..07f260319b82 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 = swiotlb_dma_supported, }; -#endif /* CONFIG_DMA_DIRECT_OPS */