From: Joerg Roedel Subject: Re: [PATCH] iommu: moving initialization earlier Date: Thu, 10 Jan 2013 18:09:43 +0100 Message-ID: <20130110170941.GA2556@8bytes.org> References: <1357545112-17375-1-git-send-email-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1357545112-17375-1-git-send-email-aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Alexey Kardashevskiy Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Benjamin Herrenschmidt List-Id: iommu@lists.linux-foundation.org On Mon, Jan 07, 2013 at 06:51:52PM +1100, Alexey Kardashevskiy wrote: > The iommu_init() initializes IOMMU internal structures and data > required for the IOMMU API as iommu_group_alloc(). > It is registered as a subsys_initcall now. > > One of the IOMMU users is going to be a PCI subsystem on POWER. > It discovers new IOMMU tables during the PCI scan so the logical > place to call iommu_group_alloc() is the moment when a new group > is discovered. However PCI scan is done from subsys_initcall hook > as IOMMU does so PCI hook can be (and is) called before the IOMMU one. > > The patch moves IOMMU subsystem initialization one step earlier > to make sure that IOMMU is initialized before PCI scan begins. > > Signed-off-by: Alexey Kardashevskiy Applied, thanks.