From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Alex Williamson <alex.williamson@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org
Subject: [PATCH] iommu: moving initialization earlier
Date: Mon, 7 Jan 2013 18:51:52 +1100 [thread overview]
Message-ID: <1357545112-17375-1-git-send-email-aik@ozlabs.ru> (raw)
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
next reply other threads:[~2013-01-07 7:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 7:51 Alexey Kardashevskiy [this message]
2013-01-10 17:09 ` [PATCH] iommu: moving initialization earlier 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
-- strict thread matches above, loose matches on Subject: below --
2012-12-13 2:29 [PATCH] vfio powerpc: enabled on powernv platform Benjamin Herrenschmidt
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357545112-17375-1-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).