linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: moving initialization earlier
@ 2013-01-07  7:51 Alexey Kardashevskiy
  2013-01-10 17:09 ` Joerg Roedel
  0 siblings, 1 reply; 67+ messages in thread
From: Alexey Kardashevskiy @ 2013-01-07  7:51 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Alexey Kardashevskiy, Alex Williamson, Benjamin Herrenschmidt,
	linux-kernel, iommu

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 <aik@ozlabs.ru>
---
 drivers/iommu/iommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index ddbdaca..1065a1a 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -861,7 +861,7 @@ static int __init iommu_init(void)
 
 	return 0;
 }
-subsys_initcall(iommu_init);
+arch_initcall(iommu_init);
 
 int iommu_domain_get_attr(struct iommu_domain *domain,
 			  enum iommu_attr attr, void *data)
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2013-01-11 16:56 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20121113033832.GW4696@truffula.fritz.box>
2012-11-20  0:48 ` [PATCH] vfio powerpc: enabled and supported on powernv platform Alexey Kardashevskiy
2012-11-20 18:19   ` Alex Williamson
2012-11-22 11:56     ` Sethi Varun-B16395
2012-11-23  2:02       ` Alexey Kardashevskiy
2012-11-26 15:18         ` Alex Williamson
2012-11-26 18:04           ` Alex Williamson
2012-11-27  0:21             ` Benjamin Herrenschmidt
2012-11-27  3:28             ` Alexey Kardashevskiy
2012-11-27  4:23               ` Alex Williamson
2012-11-26 15:08       ` Alex Williamson
2012-11-23  9:03     ` [PATCH 0/2] vfio powerpc: implemented and enabled Alexey Kardashevskiy
2012-11-23  9:03       ` [PATCH 1/2] vfio powerpc: implemented IOMMU driver for VFIO Alexey Kardashevskiy
2012-11-26 18:20         ` Alex Williamson
2012-11-27  4:06           ` Alexey Kardashevskiy
2012-11-27  4:29             ` Alex Williamson
2012-11-27  4:58               ` Alexey Kardashevskiy
2012-11-27  5:06                 ` David Gibson
2012-11-27  5:07                 ` Alex Williamson
2012-11-28  7:21                   ` [PATCH] " Alexey Kardashevskiy
2012-11-28 21:01                     ` Alex Williamson
2012-11-29  3:51                       ` Alexey Kardashevskiy
2012-11-23  9:03       ` [PATCH 2/2] vfio powerpc: enabled on powernv platform Alexey Kardashevskiy
2012-11-27  4:41         ` Alex Williamson
2012-11-28  7:18           ` [PATCH] " Alexey Kardashevskiy
2012-11-28 21:30             ` Alex Williamson
2012-11-29  3:53               ` Alexey Kardashevskiy
2012-11-29  4:20                 ` Alex Williamson
2012-11-30  6:14                   ` Alexey Kardashevskiy
2012-11-30 16:48                     ` Alex Williamson
2012-12-01  0:14                       ` Alexey Kardashevskiy
2012-11-30  6:16                   ` Alexey Kardashevskiy
2012-12-03  2:52       ` [PATCH 0/2] vfio on power: yet another try Alexey Kardashevskiy
2012-12-03  2:52         ` [PATCH 1/2] vfio powerpc: enabled on powernv platform Alexey Kardashevskiy
2012-12-03 17:35           ` Alex Williamson
2012-12-04  8:12             ` Alexey Kardashevskiy
2012-12-04 15:51               ` Alex Williamson
2012-12-07  7:35                 ` [PATCH] " Alexey Kardashevskiy
2012-12-07 17:38                   ` Alex Williamson
2012-12-12  6:14                     ` Alexey Kardashevskiy
2012-12-12 14:34                       ` Alex Williamson
2012-12-13  2:29                         ` Benjamin Herrenschmidt
2012-12-13  6:27                           ` Alexey Kardashevskiy
2012-12-13  6:28                           ` [PATCH] iommu: moving initialization earlier Alexey Kardashevskiy
2012-12-13 15:48                             ` Alex Williamson
2012-12-16 11:20                               ` Joerg Roedel
2013-01-04  8:21                                 ` Alexey Kardashevskiy
2013-01-06  9:49                                   ` Joerg Roedel
2012-12-12 12:34                     ` [PATCH] vfio powerpc: enabled on powernv platform Alexey Kardashevskiy
2012-12-12 12:38                       ` Alexey Kardashevskiy
2012-12-12 23:30                       ` Alex Williamson
2012-12-13  2:24                         ` Alexey Kardashevskiy
2012-12-13  2:39                         ` Benjamin Herrenschmidt
2012-12-13  2:57                         ` Benjamin Herrenschmidt
2012-12-13  3:22                           ` Alex Williamson
2012-12-03  2:52         ` [PATCH 2/2] vfio powerpc: implemented IOMMU driver for VFIO Alexey Kardashevskiy
2012-12-03 17:53           ` Alex Williamson
2012-12-07  7:34             ` [PATCH] " Alexey Kardashevskiy
2012-12-07 17:01               ` Alex Williamson
2012-12-12  6:59                 ` Alexey Kardashevskiy
2012-12-12 14:36                   ` Alex Williamson
2012-12-12 12:35                 ` Alexey Kardashevskiy
2013-01-07  7:51 [PATCH] iommu: moving initialization earlier Alexey Kardashevskiy
2013-01-10 17:09 ` Joerg Roedel
2013-01-10 20:40   ` Shuah Khan
2013-01-10 23:16     ` Shuah Khan
2013-01-11 14:50     ` Joerg Roedel
2013-01-11 16:56       ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).