Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6966668imu; Thu, 31 Jan 2019 02:42:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IbGRanWUvWHHWTdVGs+i+ECgsqPBrTQppJBYIZ+oy1PLgCzp773Ah4aguwK0Qrnr/L1Z6er X-Received: by 2002:a62:57c4:: with SMTP id i65mr3344743pfj.106.1548931334743; Thu, 31 Jan 2019 02:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548931334; cv=none; d=google.com; s=arc-20160816; b=CKfz+xG8FKo2GqRyHm9ENCtqbM4T3CVdeoAfiNtO6nQ/Idgh3xs6QVRuF+N8r7SpZ3 x8yI7rQxiOSWrBjykwtbFYiOFGNWYxzwqL94/L5QwFXiCMCoDA3ZTGFeLk9KFeg1bu3s kBWczfZXctUcQgjojXRHarYqNtoZMEAxf9faBeI+EdCDqpmj3wwbsUlSl4S0Z3Bq30TO je6gSoIZxpxdPFyQxCT3jclTvQqDbXAT+QgmTnMYCJ1Vk5QFnd5hWcS+xLQJ2Oh2nJ+X yM5fETq2sWLuOlTPy9J7mzFuta11wGgzXnfXtjmqb7LSY+6uerC+aW5RTTfjNov7USIM 9u4Q== 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=WSwhKmuYDiC5GqyCe1gg48VsnVho8AiBQRIHxJD+/o0=; b=jpBBfBpUyKU63wRM4Baw2Yq3L3G+OdJ9KNUK3wYFnAJxx6Sc+e6rQ2ccpEWwvOiWzp R2iiQBCXhTuoBtYTwdY8IIuPebZEQwCFp3Roq3L/IzbGJkOZt2M6etU7pfMsjlhN1YpH rrE8IsaKhRXMtSMMQSXtydmDYJfvc9vNH9Ngb9dm9qZLDj35diydmyup2o2ARc0UXeer CzpRBz3XpiQhiLNAfIi8Qac+lJh0Kf/OXX0qyNQ/yzkoeaAadpRAvMGUBF8IV6BXeJ+a 6GdBWaR9Aa/jJ/FoMaU5B08JocEnhCTQD6siO+NxhrSb6eR4hicokOpV/p/4C6rfvmaK ohgg== 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 n3si4047883pgk.405.2019.01.31.02.41.59; Thu, 31 Jan 2019 02:42:14 -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 S1727864AbfAaKlb (ORCPT + 99 others); Thu, 31 Jan 2019 05:41:31 -0500 Received: from verein.lst.de ([213.95.11.211]:56943 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbfAaKlb (ORCPT ); Thu, 31 Jan 2019 05:41:31 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 3791E68CEB; Thu, 31 Jan 2019 11:41:29 +0100 (CET) Date: Thu, 31 Jan 2019 11:41:29 +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, Thomas.Lendacky@amd.com Subject: Re: [PATCH 3/5] dma: Introduce dma_max_mapping_size() Message-ID: <20190131104129.GA9241@lst.de> References: <20190130164007.26497-1-joro@8bytes.org> <20190130164007.26497-4-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190130164007.26497-4-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 > +static inline size_t dma_max_mapping_size(struct device *dev) > +{ > + const struct dma_map_ops *ops = get_dma_ops(dev); > + size_t size = SIZE_MAX; > + > + if (dma_is_direct(ops)) > + size = dma_direct_max_mapping_size(dev); > + else if (ops && ops->max_mapping_size) > + size = ops->max_mapping_size(dev); > + > + return size; > +} Sorry for not noticing last time, but since 5.0 we keep all non-fast path DMA mapping interfaces out of line, so this should move to kernel/dma/mapping.c. > +EXPORT_SYMBOL(dma_direct_max_mapping_size); And then there is no need to export this one. The dma_max_mapping_size export should be EXPORT_SYMBOL_GPL like all new dma-mapping interfaces.