public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: aik@ozlabs•ru
To: linuxppc-dev@lists•ozlabs.org
Cc: kvm@vger•kernel.org, Alexey Kardashevskiy <aik@ozlabs•ru>,
	Alexander Graf <agraf@suse•de>,
	kvm-ppc@vger•kernel.org, linux-kernel@vger•kernel.org,
	Alex Williamson <alex.williamson@redhat•com>,
	Paul Mackerras <paulus@samba•org>,
	linux-pci@vger•kernel.org,
	David Gibson <david@gibson•dropbear.id.au>
Subject: [PATCH 1/5] iommu: Move initialization earlier
Date: Mon,  6 May 2013 17:21:57 +1000	[thread overview]
Message-ID: <51875a31.25ac440a.50d9.ffffe8fd@mx.google.com> (raw)
In-Reply-To: <1367824921-27151-1-git-send-email-y>

From: Alexey Kardashevskiy <aik@ozlabs•ru>

The iommu_init() call initializes IOMMU internal structures and data
required for the API to function such as iommu_group_alloc().
It is registered as a subsys_initcall.

One of the IOMMU users is a PCI subsystem on POWER which discovers new
IOMMU tables during the PCI scan so the most logical place to call
iommu_group_alloc() is when a new group is just discovered. However
PCI scan is done from subsys_initcall hook as well, which makes
use of the IOMMU API impossible.

This moves IOMMU subsystem initialization one step earlier.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs•ru>
Cc: David Gibson <david@gibson•dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba•org>
---
 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 5514dfa..0de83eb 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -890,7 +890,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

       reply	other threads:[~2013-05-06  7:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367824921-27151-1-git-send-email-y>
2013-05-06  7:21 ` aik [this message]
2013-05-06  7:21 ` [PATCH 2/5] KVM: PPC: iommu: Add missing kvm_iommu_map_pages/kvm_iommu_unmap_pages aik
2013-05-06 21:07   ` Alex Williamson
2013-05-07  0:49     ` Alexey Kardashevskiy
2013-05-07  1:42       ` Alex Williamson
2013-05-07  3:28         ` Alexey Kardashevskiy
2013-05-06  7:21 ` [PATCH 3/5] powerpc/vfio: Enable on POWERNV platform aik
2013-05-06  7:22 ` [PATCH 4/5] powerpc/vfio: Implement IOMMU driver for VFIO aik
2013-05-06  7:22 ` [PATCH 5/5] powerpc/vfio: Enable on pSeries platform aik

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=51875a31.25ac440a.50d9.ffffe8fd@mx.google.com \
    --to=aik@ozlabs$(echo .)ru \
    --cc=agraf@suse$(echo .)de \
    --cc=alex.williamson@redhat$(echo .)com \
    --cc=david@gibson$(echo .)dropbear.id.au \
    --cc=kvm-ppc@vger$(echo .)kernel.org \
    --cc=kvm@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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