From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 9B1BA1A0730 for ; Thu, 15 Oct 2015 02:39:12 +1100 (AEDT) Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Oct 2015 11:39:09 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 247B4C90043 for ; Wed, 14 Oct 2015 11:27:17 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t9EFd56O59899942 for ; Wed, 14 Oct 2015 15:39:05 GMT Received: from d01av04.pok.ibm.com (localhost [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t9EFd2BN011860 for ; Wed, 14 Oct 2015 11:39:05 -0400 Date: Wed, 14 Oct 2015 08:39:00 -0700 From: Nishanth Aravamudan To: Christoph Hellwig Cc: Matthew Wilcox , Keith Busch , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Alexey Kardashevskiy , David Gibson , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 1/5 v2] dma-mapping: add generic dma_get_page_shift API Message-ID: <20151014153900.GC30179@linux.vnet.ibm.com> References: <20151002171606.GA41011@linux.vnet.ibm.com> <20151002200953.GB40695@linux.vnet.ibm.com> <20151002201142.GC40695@linux.vnet.ibm.com> <20151006095136.GB14144@infradead.org> <20151012210651.GB26702@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20151012210651.GB26702@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Christoph, On 12.10.2015 [14:06:51 -0700], Nishanth Aravamudan wrote: > On 06.10.2015 [02:51:36 -0700], Christoph Hellwig wrote: > > Do we need a function here or can we just have a IOMMU_PAGE_SHIFT define > > with an #ifndef in common code? > > On Power, since it's technically variable, we'd need a function. So are > you suggesting define'ing it to a function just on Power and leaving it > a constant elsewhere? > > I noticed that sparc has a IOMMU_PAGE_SHIFT already, fwiw. Sorry, I should have been more specific -- I'm ready to spin out a v3, with a sparc-specific function. Are you ok with leaving it a function for now (the only caller is in NVMe obviously). -Nish