Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753230AbbG1RBq (ORCPT ); Tue, 28 Jul 2015 13:01:46 -0400 Received: from mga11.intel.com ([192.55.52.93]:22558 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752688AbbG1RBp (ORCPT ); Tue, 28 Jul 2015 13:01:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,564,1432623600"; d="scan'208";a="756714525" Subject: Re: [PATCH char-misc-next 10/19] lib: convert iova.c into a library From: Sudeep Dutt To: David Woodhouse Cc: Robin Murphy , Ashutosh Dixit , Joerg Roedel , Greg Kroah-Hartman , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , "David S. Miller" , Nikhil Rao , Anil S Keshavamurthy , Harish Chegondi , "sakari.ailus@linux.intel.com" , "Dutt, Sudeep" In-Reply-To: <1438094293.26913.177.camel@infradead.org> References: <8131ebc8ecb5ef13ef0aa4c49dabe9694f0e410f.1438040669.git.ashutosh.dixit@intel.com> <20150728100340.GR10969@8bytes.org> <55B75C69.30200@arm.com> <1438094293.26913.177.camel@infradead.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 28 Jul 2015 10:01:00 -0700 Message-ID: <1438102860.6314.49.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-30.el6) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2244 Lines: 59 On Tue, 2015-07-28 at 15:38 +0100, David Woodhouse wrote: > On Tue, 2015-07-28 at 11:41 +0100, Robin Murphy wrote: > > On 28/07/15 11:03, Joerg Roedel wrote: > > > On Mon, Jul 27, 2015 at 04:57:32PM -0700, Ashutosh Dixit wrote: > > > > From: Harish Chegondi > > > > > > > > This patch converts iova.c into a library, moving it from > > > > drivers/iommu/ to lib/, and exports its virtual address > > > > allocation and > > > > management functions so that other modules can reuse them. > > > > > > > > Cc: Joerg Roedel > > > > Reviewed-by: Anil S Keshavamurthy > > > > > > > > Reviewed-by: Sudeep Dutt > > > > Signed-off-by: Harish Chegondi > > > > > > Where is this going to be used outside of the IOMMU world? > > > We are using the IOVA generator in the SCIF driver posted @ http://thread.gmane.org/gmane.linux.kernel/2005895 under drivers/misc/mic/scif > > > > ...and how does it relate to the patches from Sakari (+CC) doing much > > the same thing[1]? > The patch series from Sakari does the right thing by moving the IOVA cache management to the IOVA library. We will simply drop this current patch as it is incorrect. > I merged Sakari's patches into the intel-iommu git tree today, FWIW. > > If there's really a need to move it from drivers/iommu/ to lib/ then we > could feasibly do that too. > The patch series from Sakari should work perfectly for us. We will post a v2 of the current SCIF patch series without this IOVA patch and modify the SCIF driver to use the newly added iova_cache_get(..) and iova_cache_put(..) APIs once it is available in Linus's tree. It would make it easier for us to integrate if Sakari's patches reach mainline soon. It might be cleaner to move IOVA to lib/ in the longer term since we will have multiple driver subsystems using it, but it should work just fine for now. Thanks for the review! Sudeep Dutt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/