Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2587614ybm; Thu, 23 May 2019 20:53:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3TBTp2dvySIYhvkRDF7gp+rJ1ELlaHAmmtA0wG8/EMtIKUeXYWeewo7X34llVd7wlqVR4 X-Received: by 2002:a17:90a:e17:: with SMTP id v23mr6258895pje.139.1558670028396; Thu, 23 May 2019 20:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558670028; cv=none; d=google.com; s=arc-20160816; b=nk5z4IRDkjXmqjgThatKZXnlt2Hzd65bXBaKMZi/4bnZPgs/qAWqsJ+a4WOm6QXy2e v0mKwHgu3ScRF6KK5F2gfq7XQwe5seAZHc6JZUSvE2v8U9iqBAh8xk8bYHJcht7hkYcl qITjMgnazLRLHs3lZKtVolQM6wWQ76dq4pICP9FkUWSyijVQqFeumRhALdnDxU9nrZIm 2sM//tQ+CyAt9jLPZ5i2jUmtowUtNe5xJdmaa2690dakmjq84XMoFAnAZvucKJkYVM8I DlZlC6MzbYl7W/UPIooyRu80pzYhdaaaoIGIX7g2jcI1NTayosU6UzMbVALN9jUDlvtl xBQQ== 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:dkim-signature; bh=Meys5AbfHefJr2MxUEnx8+OGhp7ATRQ7K3gNKd4wdrU=; b=qXV17jLq5aPI9Mw099Av9ccjs3N8+vv4D7CfNGH6l4NbBf9TV4uBhWVq0gTidgScsH TWy4voBMP5uu9NSN4FGyNXysKs7z1yT3IB1W66CKMtPPFcDaZTFgwL+hUjDxNqXe5f5l L9VMnOelLd3KB/eb+ICNP5tMpQ5BUIGz8eOMW2IbLGqAkIH2UsBoxQu6LfbtnWCUjMiW qUKy5ea/IstCdydPIQ1auyPqlJq4MNFXODeRy4AvTjIMXeGfD6LkVbcARg3FP31ENTQM tT5iICKDpvlj2gyBRmH2Ad46a83yLY5QLkM3UZSNZHskD9txBdOOofqGleZVYSve3Xti g3/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I13Gm5o+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si2329244pga.249.2019.05.23.20.53.28; Thu, 23 May 2019 20:53:48 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I13Gm5o+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388518AbfEXDuX (ORCPT + 99 others); Thu, 23 May 2019 23:50:23 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34959 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387454AbfEXDuX (ORCPT ); Thu, 23 May 2019 23:50:23 -0400 Received: by mail-pf1-f196.google.com with SMTP id d126so2260867pfd.2 for ; Thu, 23 May 2019 20:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Meys5AbfHefJr2MxUEnx8+OGhp7ATRQ7K3gNKd4wdrU=; b=I13Gm5o+tN+033OCvQGYRdseWRYb9y90+wOF9EOUaj5QRKDbsWYikvdOqa1LdVYQEF 2ZhjMALlX6tUrs4zDwq1lDEx7N9iOWHW8f55MRV5cptdY9kFlQIxNj/MkE6ngkkcj94E alV39V4sXHGmtUolQpKWYkEkBxkp8DzTJ4SGfD4WzrUJNVCoixeDMhYE2dhMyilMw2ag TV4Kvy3VTjC6YN5gvxd017GB+M3IZxKYs2+45rwxyjsVyd59inqpXo0xdPcb6v22bT/I Iz9pS2laGebLE5B2y8xaoswYxzXi0rdnnGrcsA/IhWJ1i6IxND6Hh/AQ4WdgnGhUunqw FuYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Meys5AbfHefJr2MxUEnx8+OGhp7ATRQ7K3gNKd4wdrU=; b=SUg/prABaePw4LuIt/Rdh66dPRE9m2U4D1/eCKA5xvSsOVl8g0FdUqaO/CmYsW/MRR 4czGhZjZAx/AH3GLvhn/lPITr3XMdF5N9bYFX+epzWrFVXSSocbKkr4tuPAchHFgYGla qCNqN+sHc6LiuuHDmqsy2htgwQuUv+XjUBuXYjeLw1RxAQZVlTwcBhJn4vFfzrTlLfJn Q3m4cWeAVcEnsMoJEgxCQUdV73nTFiSrS2Qr69d9hMUTkf9GFhf1bpi8wbsgetfajGyU 9vSh+SgHDDQp7srIN8E4TMMWZ893e6TXBfCXBM41DrZNpyn43USCzN0RGiv5LvWZZUVo BhOA== X-Gm-Message-State: APjAAAVZA3grf/UyDzEuqWj0j+JasACr1hSXKA0M8DHylrJBFSfkDHvm io78waGBrV6fKpvjd+TM2TTpeUhBPDB8AA== X-Received: by 2002:a63:2a06:: with SMTP id q6mr16134258pgq.290.1558669821822; Thu, 23 May 2019 20:50:21 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id h11sm903497pfn.170.2019.05.23.20.50.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2019 20:50:21 -0700 (PDT) Date: Thu, 23 May 2019 20:49:04 -0700 From: Nicolin Chen To: dann frazier Cc: Christoph Hellwig , Robin Murphy , Marek Szyprowski , chris@zankel.net, linux-xtensa@linux-xtensa.org, keescook@chromium.org, sfr@canb.auug.org.au, tony@atomide.com, Catalin Marinas , joro@8bytes.org, Will Deacon , linux@armlinux.org.uk, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, jcmvbkbc@gmail.com, wsa+renesas@sang-engineering.com, akpm@linux-foundation.org, treding@nvidia.com, dwmw2@infradead.org, iamjoonsoo.kim@lge.com, linux-arm-kernel Subject: Re: [PATCH v2 1/2] dma-contiguous: Abstract dma_{alloc, free}_contiguous() Message-ID: <20190524034904.GA30034@Asurada-Nvidia.nvidia.com> References: <20190506223334.1834-1-nicoleotsuka@gmail.com> <20190506223334.1834-2-nicoleotsuka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 08:59:30PM -0600, dann frazier wrote: > > > diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c > > > index b2a87905846d..21f39a6cb04f 100644 > > > --- a/kernel/dma/contiguous.c > > > +++ b/kernel/dma/contiguous.c > > > @@ -214,6 +214,54 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages, > > > return cma_release(dev_get_cma_area(dev), pages, count); > > > } > > > > This breaks the build for me if CONFIG_DMA_CMA=n: > > > > LD [M] fs/9p/9p.o > > ld: fs/9p/vfs_inode.o: in function `dma_alloc_contiguous': > > vfs_inode.c:(.text+0xa60): multiple definition of > > `dma_alloc_contiguous'; fs/9p/vfs_super.o:vfs_super.c:(.text+0x500): > > first defined here > > > > Do the following insertions need to be under an #ifdef CONFIG_DMA_CMA ? > > Ah, no - the problem is actually a missing "static inline" in the > !CONFIG_DMA_CMA version of dma_alloc_contiguous(). Yea, I saw it. Thanks for the testing and pointing it out. Sending v3.....