Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4782143imu; Tue, 15 Jan 2019 06:01:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN49ShtSnKMZT53+S9qY8FxzpuVi7zGoGv12PqYM6187H/pow0mQsNR7V9gZGJwP7h9A/FMz X-Received: by 2002:a62:2e46:: with SMTP id u67mr4122094pfu.3.1547560879389; Tue, 15 Jan 2019 06:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547560879; cv=none; d=google.com; s=arc-20160816; b=hJaUtKo3CbxSOczblgH2yyLc0BtkGOAmLPlWKRDuxOUj0YzkrRvHB7uulNQIag+fom LxZz9x3N4GUN4CPN50aLVMt103Im6SJkV0lKzN5BdGn0Sj5htthSKv1wt6YoS1Jfn9i5 VfNNNg263HL8IFU5gteJthhsdIVriNcANL4MEFxhLJGDBPrrO9xhfM4S2+B412h20y3X TT/wTHCWIraB2ANjixHRcdF+RkokIWoSkqNCIdiQXmAwRYysw+juQIhUeqeyYsfBNhZ5 yifKXmu32juWqoJ5vqbcqNHsw2YjUQCe/+Un4E4oXus7ZsCCzbruCToiV0PWoIG3oK/2 lqlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2ORezk0ZtsqJWvHa7AV7h+OKrQhMyh63nkC23micirM=; b=s+aoBwSznHt3eg03hBG9H4NxaNt8HAnNlr6jT6NLhLb9hlWyogeBO5idGuEv73FEsu ed3Z8rVSvvhzUmjnb+ny7BAtbUuYRCJvF1tD0R4amxw67PzT9rabs4/C05igqgPt2+s7 JZ8/WuSg0VYntMp5d9r7ePUfvZksInZ3EzkwvfUDPGfsX+o9oK5hiZUCJ8bmQVdVUE3E eL7FJc8b7OJBsbSvkNTPkBo/T4hnxxwu0CJ944ZHvipCXAPziEND9Zhos26T3stN86MT SDsucmuwLxduUz0kFT3iZoc7dSUx/RjWRAQTWKyHK1ezNS8SYpZSerxqyIC91yXW71/H 61zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go3si3135889plb.97.2019.01.15.06.01.01; Tue, 15 Jan 2019 06:01:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729790AbfAONh4 (ORCPT + 99 others); Tue, 15 Jan 2019 08:37:56 -0500 Received: from verein.lst.de ([213.95.11.211]:53107 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729294AbfAONhz (ORCPT ); Tue, 15 Jan 2019 08:37:55 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 0B4CD67358; Tue, 15 Jan 2019 14:37:54 +0100 (CET) Date: Tue, 15 Jan 2019 14:37:54 +0100 From: Christoph Hellwig To: Joerg Roedel Cc: "Michael S . Tsirkin" , Jason Wang , Konrad Rzeszutek Wilk , Christoph Hellwig , Jens Axboe , virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, jfehlig@suse.com, jon.grimm@amd.com, brijesh.singh@amd.com, jroedel@suse.de Subject: Re: [PATCH 2/3] dma: Introduce dma_max_mapping_size() Message-ID: <20190115133754.GB29225@lst.de> References: <20190115132257.6426-1-joro@8bytes.org> <20190115132257.6426-3-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190115132257.6426-3-joro@8bytes.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +size_t dma_direct_max_mapping_size(struct device *dev) > +{ > + /* > + * Return the minimum of the direct DMA limit and the SWIOTLB limit. > + * Since direct DMA has no limit, it is fine to just return the SWIOTLB > + * limit. > + */ > + return swiotlb_max_mapping_size(dev); Well, if we don't actually use the swiotlb buffers despite it being compiled in or even allocated we don't need the limit.