[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110907192931.GB31674@8bytes.org>
Date: Wed, 7 Sep 2011 21:29:31 +0200
From: Joerg Roedel <joro@...tes.org>
To: Greg KH <gregkh@...e.de>
Cc: Joerg Roedel <joerg.roedel@....com>,
iommu@...ts.linux-foundation.org,
Alex Williamson <alex.williamson@...hat.com>,
Ohad Ben-Cohen <ohad@...ery.com>,
David Woodhouse <dwmw2@...radead.org>,
David Brown <davidb@...eaurora.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/10] IOMMU: Make iommu_ops per-bus_type
On Wed, Sep 07, 2011 at 11:48:40AM -0700, Greg KH wrote:
> On Wed, Sep 07, 2011 at 05:41:43PM +0200, Joerg Roedel wrote:
> > Diffstat:
> >
> > arch/ia64/kvm/kvm-ia64.c | 3 +-
> > arch/x86/kvm/x86.c | 3 +-
> > drivers/base/bus.c | 16 ++++++++++
> > drivers/iommu/amd_iommu.c | 2 +-
> > drivers/iommu/intel-iommu.c | 2 +-
> > drivers/iommu/iommu.c | 58 ++++++++++++++++++++++++------------
> > drivers/iommu/msm_iommu.c | 2 +-
> > drivers/iommu/omap-iommu.c | 2 +-
> > drivers/media/video/omap3isp/isp.c | 2 +-
> > include/linux/device.h | 9 +++++
> > include/linux/iommu.h | 21 +++++++------
> > virt/kvm/iommu.c | 4 +-
> > 12 files changed, 86 insertions(+), 38 deletions(-)
>
> So the overall work here makes for more code, right? I fail to see the
> benifit, what am I missing?
Yes, the code that moves code out of the IOMMU drivers is not included
here. This is only the infrastructure for future code generalization in
the IOMMU driver. That is why the iommu_bus_init() function in patch 2
is still empty :)
For example, the IOMMU drivers on x86 implement device-notifier
callbacks to know when devices are added or removed to do iommu-specific
setup. The iommu drivers also scan over the devices on a bus to do
initialization. All this device-walking code and the notifiers can be
moved to generic IOMMU code leaving only the specific setup routines in
the iommu drivers.
Regards,
Joerg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists