From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbbJBRj5 (ORCPT ); Fri, 2 Oct 2015 13:39:57 -0400 Received: from e18.ny.us.ibm.com ([129.33.205.208]:40665 "EHLO e18.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753073AbbJBRjz (ORCPT ); Fri, 2 Oct 2015 13:39:55 -0400 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: nacc@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Fri, 2 Oct 2015 10:39:47 -0700 From: Nishanth Aravamudan To: Christoph Hellwig Cc: Matthew Wilcox , Alexey Kardashevskiy , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Keith Busch , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, David Gibson Subject: Re: [PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power Message-ID: <20151002173947.GA40695@linux.vnet.ibm.com> References: <20151002171606.GA41011@linux.vnet.ibm.com> <20151002171800.GB41011@linux.vnet.ibm.com> <20151002172313.GC41011@linux.vnet.ibm.com> <20151002172544.GA16139@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151002172544.GA16139@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: 15100217-0045-0000-0000-000001AF69A3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.10.2015 [10:25:44 -0700], Christoph Hellwig wrote: > Hi Nishanth, > > please expose this value through the generic DMA API instead of adding > architecture specific hacks to drivers. Ok, I'm happy to do that instead -- what I struggled with is that I don't have enough knowledge of the various architectures to provide the right default implementation. It should be sufficient for the default to return PAGE_SHIFT, and on Power just override that to return the IOMMU table's page size? Since the only user will be the NVMe driver currently, that should be fine? Sorry for the less-than-ideal patch! -Nish