From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752013AbbJLVHA (ORCPT ); Mon, 12 Oct 2015 17:07:00 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:37727 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbbJLVG7 (ORCPT ); Mon, 12 Oct 2015 17:06:59 -0400 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: nacc@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Mon, 12 Oct 2015 14:06:51 -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: <20151012210651.GB26702@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151006095136.GB14144@infradead.org> X-Operating-System: Linux 3.13.0-40-generic (x86_64) User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15101221-0033-0000-0000-0000065851CF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Nish